summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2019-02-15 14:03:59 +0100
committerGitHub <noreply@github.com>2019-02-15 14:03:59 +0100
commitf475489b649425e2ec70c6b300ffec111d517790 (patch)
tree7094c930ee32fe98b2f4e543b274214ef2cbe896 /application
parentca662e97800119ea5a258400d2296d33bdadde01 (diff)
parentcb959aec3a5c62de58067d5e2fe7333e1aac4d1e (diff)
downloadUXP-f475489b649425e2ec70c6b300ffec111d517790.tar
UXP-f475489b649425e2ec70c6b300ffec111d517790.tar.gz
UXP-f475489b649425e2ec70c6b300ffec111d517790.tar.lz
UXP-f475489b649425e2ec70c6b300ffec111d517790.tar.xz
UXP-f475489b649425e2ec70c6b300ffec111d517790.zip
Merge pull request #972 from MoonchildProductions/issue-971
Treat aContext as a bitfield in openURI.
Diffstat (limited to 'application')
-rw-r--r--application/palemoon/base/content/browser.js8
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");