Bug 1147911 Part 1: Fix call to _openURIInNewTab in browser.js to take a URI referrer not a string. r=gijs
☠☠ backed out by 5d26c678753a ☠ ☠
authorBob Owen <bobowencode@gmail.com>
Wed, 23 Nov 2016 13:36:57 +0000
changeset 324080 e793767cb441db6307235e81575c04bf60e1139d
parent 324079 7f9e1e63b71081efcb4070bc5231cd130dca145a
child 324081 5b26ae9afaea99909f22dc274f259575c0a998dc
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersgijs
bugs1147911
milestone53.0a1
Bug 1147911 Part 1: Fix call to _openURIInNewTab in browser.js to take a URI referrer not a string. r=gijs
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5020,17 +5020,18 @@ nsBrowserAccess.prototype = {
 
     var isExternal = !!(aFlags & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
 
     var userContextId = aParams.openerOriginAttributes &&
                         ("userContextId" in aParams.openerOriginAttributes)
                           ? aParams.openerOriginAttributes.userContextId
                           : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID
 
-    let browser = this._openURIInNewTab(aURI, aParams.referrer,
+    let referrer = aParams.referrer ? makeURI(aParams.referrer) : null;
+    let browser = this._openURIInNewTab(aURI, referrer,
                                         aParams.referrerPolicy,
                                         aParams.isPrivate,
                                         isExternal, false,
                                         userContextId);
     if (browser)
       return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
 
     return null;