diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-13 09:23:25 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-15 14:07:47 +0100 |
commit | 6efbf737e574bf41cc682fd2891a7971981ab05c (patch) | |
tree | 229d15a8686b759a90764303ce61bfa4aa63b5b7 | |
parent | f97c06d4354b26acdbab3799e7ec2191ba458735 (diff) | |
download | UXP-6efbf737e574bf41cc682fd2891a7971981ab05c.tar UXP-6efbf737e574bf41cc682fd2891a7971981ab05c.tar.gz UXP-6efbf737e574bf41cc682fd2891a7971981ab05c.tar.lz UXP-6efbf737e574bf41cc682fd2891a7971981ab05c.tar.xz UXP-6efbf737e574bf41cc682fd2891a7971981ab05c.zip |
Treat aContext as a bitfield in openURI.
Potential fix for #971
-rw-r--r-- | application/palemoon/base/content/browser.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index eb4916e37..3feeef9b6 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -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"); |