Bug 1147911 Part 1: Fix call to _openURIInNewTab in browser.js to take a URI referrer not a string. r=gijs
authorBob Owen <bobowencode@gmail.com>
Thu, 24 Nov 2016 15:08:30 +0000
changeset 324217 19e3bf665a8e22adc47a900814fcb50153f199ec
parent 324216 49228a69b071bc200360aa43845b42b996759479
child 324218 9245c2950d5544982b4a769b154043ebfb7b1783
push id30993
push usercbook@mozilla.com
push dateFri, 25 Nov 2016 14:40:38 +0000
treeherdermozilla-central@b982373cb0e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1147911
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;