[tbb-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-115.16.0esr-13.5-1] fixup! Bug 42019: Empty browser's clipboard on browser shutdown

ma1 (@ma1) git at gitlab.torproject.org
Thu Oct 17 20:23:28 UTC 2024



ma1 pushed to branch mullvad-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser


Commits:
f1b8976d by hackademix at 2024-10-17T22:23:03+02:00
fixup! Bug 42019: Empty browser's clipboard on browser shutdown

Bug 43209: Check if any data is available before trying to retrieve it from the clipboard.

- - - - -


1 changed file:

- browser/components/BrowserGlue.sys.mjs


Changes:

=====================================
browser/components/BrowserGlue.sys.mjs
=====================================
@@ -165,8 +165,17 @@ const ClipboardPrivacy = {
     return trans;
   },
   _computeClipboardHash() {
+    const flavors = ["text/x-moz-url", "text/plain"];
+    if (
+      !Services.clipboard.hasDataMatchingFlavors(
+        flavors,
+        Ci.nsIClipboard.kGlobalClipboard
+      )
+    ) {
+      return null;
+    }
     const trans = this._createTransferable();
-    ["text/x-moz-url", "text/plain"].forEach(trans.addDataFlavor);
+    flavors.forEach(trans.addDataFlavor);
     try {
       Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
       const clipboardContent = {};



View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/f1b8976dac2e875e616dcdebb852f03b6724a579

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/f1b8976dac2e875e616dcdebb852f03b6724a579
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20241017/6af99ff7/attachment-0001.htm>


More information about the tbb-commits mailing list