Treat aContext as a bitfield in openURI.

Potential fix for #971
This commit is contained in:
wolfbeast 2019-02-13 09:23:25 +01:00 committed by Roy Tam
commit 5a70528be7

View file

@ -4408,7 +4408,13 @@ nsBrowserAccess.prototype = {
openURI: function (aURI, aOpener, aWhere, aContext) {
var newWindow = null;
var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
var isExternal = !!(aContext & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
if (aOpener && isExternal) {
Cu.reportError("nsBrowserAccess.openURI did not expect an opener to be " +
"passed if the context is OPEN_EXTERNAL.");
throw Cr.NS_ERROR_FAILURE;
}
if (isExternal && aURI && aURI.schemeIs("chrome")) {
dump("use -chrome command-line option to load external chrome urls\n");