Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: common.js

Issue 29338436: Issue 3814 - Opening sharing pop-up fails starting with Firefox 47 (Closed)
Patch Set: Created March 16, 2016, 2:05 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common.js
===================================================================
--- a/common.js
+++ b/common.js
@@ -68,20 +68,30 @@
// to have a fake top level frame to avoid problems with scripts that try to
// communicate with the first-run page
var isGecko = ("Components" in window);
if (isGecko)
{
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)
{
console.error(ex);
}
}
var popupMessageReceived = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld