From c6482d6bcf50ce31e458904ea9e37ee31ed9c964 Mon Sep 17 00:00:00 2001 From: James Willcox Date: Wed, 24 Jul 2019 14:52:42 +0000 Subject: [PATCH] Bug 1561913 - Correctly propagate referrer policy in GeckoView nsIBrowserDOMWindow impl r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D36617 --HG-- extra : moz-landing-system : lando --- mobile/android/modules/geckoview/GeckoViewNavigation.jsm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm index 3221912d5c38..b5c45780979b 100644 --- a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm +++ b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm @@ -413,6 +413,7 @@ class GeckoViewNavigation extends GeckoViewModule { aFlags, aTriggeringPrincipal, aCsp, + aReferrerInfo, aNextRemoteTabId ) { debug`handleOpenUri: uri=${aUri && aUri.spec} @@ -452,9 +453,11 @@ class GeckoViewNavigation extends GeckoViewModule { return null; } + // 3) We have a new session and a browser element, load the requested URI. browser.loadURI(aUri.spec, { triggeringPrincipal: aTriggeringPrincipal, csp: aCsp, + referrerInfo: aReferrerInfo, }); return browser; } @@ -468,6 +471,7 @@ class GeckoViewNavigation extends GeckoViewModule { aFlags, aTriggeringPrincipal, aCsp, + null, null ); return browser && browser.contentWindow; @@ -482,6 +486,7 @@ class GeckoViewNavigation extends GeckoViewModule { aFlags, aParams.triggeringPrincipal, aParams.csp, + aParams.referrerInfo, aNextRemoteTabId ); return browser;