[Pkg-mozext-commits] [adblock-plus] 40/87: Issue 3814 - Opening sharing pop-up fails starting with Firefox 47

David Prévot taffit at moszumanska.debian.org
Sat Apr 30 17:59:06 UTC 2016


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

taffit pushed a commit to branch master
in repository adblock-plus.

commit d6484f7d9ad40a49ca0c29dfdf199b5589b9691f
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Wed Mar 16 14:56:42 2016 +0100

    Issue 3814 - Opening sharing pop-up fails starting with Firefox 47
---
 common.js | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/common.js b/common.js
index c14ff7a..8168515 100644
--- a/common.js
+++ b/common.js
@@ -73,10 +73,20 @@
       try
       {
         var Ci = Components.interfaces;
-        iframe.contentWindow
+        var docShell = iframe.contentWindow
           .QueryInterface(Ci.nsIInterfaceRequestor)
-          .getInterface(Ci.nsIDocShell)
-          .setIsBrowserInsideApp(Ci.nsIScriptSecurityManager.UNKNOWN_APP_ID);
+          .getInterface(Ci.nsIDocShell);
+
+        if (typeof docShell.frameType != "undefined")
+        {
+          // Gecko 47+
+          docShell.frameType = docShell.FRAME_TYPE_BROWSER;
+        }
+        else
+        {
+          // Legacy branch
+          docShell.setIsBrowserInsideApp(Ci.nsIScriptSecurityManager.UNKNOWN_APP_ID);
+        }
       }
       catch(ex)
       {

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



More information about the Pkg-mozext-commits mailing list