[X2Go-Commits] [pale-moon] 95/102: Treat aContext as a bitfield in openURI.

git-admin at x2go.org git-admin at x2go.org
Mon Feb 25 23:25:57 CET 2019


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

x2go pushed a commit to branch upstream/28.4.0
in repository pale-moon.

commit 6efbf737e574bf41cc682fd2891a7971981ab05c
Author: wolfbeast <mcwerewolf at wolfbeast.com>
Date:   Wed Feb 13 09:23:25 2019 +0100

    Treat aContext as a bitfield in openURI.
    
    Potential fix for #971
---
 application/palemoon/base/content/browser.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index eb4916e..3feeef9 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");

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list