Bug 1496220 - 4. Add triggering principal parameter to RemoteWebNavigation.loadURI; r=jkt
☠☠ backed out by 47e77fc9d699 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Wed, 17 Oct 2018 16:12:38 +0000
changeset 497453 bc592bed0522e528eb713f24a639be4c299eb715
parent 497452 7b5505d44965fd3b0719610c52a827c89a6081db
child 497454 2c1353f4a3f554a95bcf73521b05ef4c0335f6e0
push id9996
push userarchaeopteryx@coole-files.de
push dateThu, 18 Oct 2018 18:37:15 +0000
treeherdermozilla-beta@8efe26839243 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjkt
bugs1496220
milestone64.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 1496220 - 4. Add triggering principal parameter to RemoteWebNavigation.loadURI; r=jkt nsIWebNavigation.loadURI actually has an optional triggering principal parameter that RemoteWebNavigation hasn't implemented. This patch adds the extra parameter to RemoteWebNavigation's implementation so triggering principals are passed properly when loadURI is called with a triggering principal. Differential Revision: https://phabricator.services.mozilla.com/D8460
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
--- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
@@ -60,20 +60,22 @@ RemoteWebNavigation.prototype = {
     this._sendMessage("WebNavigation:GoBack", {});
   },
   goForward() {
     this._sendMessage("WebNavigation:GoForward", {});
   },
   gotoIndex(aIndex) {
     this._sendMessage("WebNavigation:GotoIndex", {index: aIndex});
   },
-  loadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders) {
+  loadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders,
+          aTriggeringPrincipal) {
     this.loadURIWithOptions(aURI, aLoadFlags, aReferrer,
                             Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
-                            aPostData, aHeaders, null);
+                            aPostData, aHeaders, null,
+                            aTriggeringPrincipal);
   },
   loadURIWithOptions(aURI, aLoadFlags, aReferrer, aReferrerPolicy,
                      aPostData, aHeaders, aBaseURI, aTriggeringPrincipal) {
     // We know the url is going to be loaded, let's start requesting network
     // connection before the content process asks.
     // Note that we might have already setup the speculative connection in some
     // cases, especially when the url is from location bar or its popup menu.
     if (aURI.startsWith("http:") || aURI.startsWith("https:")) {