[Pkg-mozext-commits] [tabmixplus] 10/34: [e10s] Stop using unsafe CPOW by openMultipleLinks (see changeset 18787da65188)

David Prévot taffit at moszumanska.debian.org
Mon Mar 9 23:28:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 0d4f5976dd5bec0bce93c6c7cbb92c95f327230d
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Feb 22 13:16:24 2015 +0200

    [e10s] Stop using unsafe CPOW by openMultipleLinks (see changeset 18787da65188)
---
 chrome/content/click/click.js           | 15 +++++++++++----
 chrome/content/content.js               |  4 ++--
 chrome/content/extensions/extensions.js |  2 +-
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/chrome/content/click/click.js b/chrome/content/click/click.js
index 009a149..8a7f244 100644
--- a/chrome/content/click/click.js
+++ b/chrome/content/click/click.js
@@ -719,16 +719,23 @@ var TabmixContext = {
   },
 
   openMultipleLinks: function TMP_openMultipleLinks(check) {
-    let urls = [], browser = window.gBrowser.selectedBrowser;
-    if (Tabmix.isVersion(320)) {
+    let urls = [];
+    let browser = window.gBrowser.selectedBrowser;
+
+    function getLinks() {
       try {
         let handler = TabmixSvc.syncHandlers.get(browser.permanentKey);
-        urls = handler.getSelectedLinks(check);
+        let result = handler.getSelectedLinks();
+        gContextMenu.tabmixLinks = result && result.split('\n');
       } catch(ex) {
         Tabmix.log("unable to get syncHandlers for page " +
-                      browser.currentURI.spec + "\n" + ex);
+                   browser.currentURI.spec + "\n" + ex);
       }
+      return gContextMenu.tabmixLinks || [];
     }
+
+    if (Tabmix.isVersion(320))
+      urls = gContextMenu.tabmixLinks || getLinks();
     // getSelectedLinks was not implemented for remote tabs before Firefox 32
     else if (browser.getAttribute("remote") != "true")
       urls = Tabmix.ContextMenu.getSelectedLinks(content, check);
diff --git a/chrome/content/content.js b/chrome/content/content.js
index 1419739..e29876c 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -66,8 +66,8 @@ let TabmixContentHandler = {
     return DocShellCapabilities.collect(docShell).join(",") || "";
   },
 
-  getSelectedLinks: function(check) {
-    return ContextMenu.getSelectedLinks(content, check);
+  getSelectedLinks: function() {
+    return ContextMenu.getSelectedLinks(content).join("\n");
   },
 
   isFrameInContent: function(href, name) {
diff --git a/chrome/content/extensions/extensions.js b/chrome/content/extensions/extensions.js
index 566e09a..7dfa4d0 100644
--- a/chrome/content/extensions/extensions.js
+++ b/chrome/content/extensions/extensions.js
@@ -451,7 +451,7 @@ var TMP_extensionsCompatibility = {
         'Tabmix.loadTabs(urls, false);',
         'urls = urls.map(function(url) rdrb.cleanLink(url));\n' +
         '      $&'
-      ).toCode(true);
+      ).toCode();
     }
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list