Bug 1496220 - 1. Serialize default null principal in RemoteWebNavigation; r=jkt
☠☠ backed out by 0bd0dc3c8183 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Fri, 05 Oct 2018 13:40:43 +0000
changeset 496347 abf2e04e30e4bb0b9cb534926e4df492b9fecf0b
parent 496346 f5c1a7734493d3cf9e1ded5731bba0528b01155f
child 496348 daf7ced3bbccbbf3a17d2bdc3d65d97def353762
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [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 - 1. Serialize default null principal in RemoteWebNavigation; r=jkt RemoteWebNavigation is expected to pass a serialized principal, so the default null principal should be serialized as well. Differential Revision: https://phabricator.services.mozilla.com/D7784
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
--- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
@@ -100,19 +100,18 @@ RemoteWebNavigation.prototype = {
     this._sendMessage("WebNavigation:LoadURI", {
       uri: aURI,
       flags: aLoadFlags,
       referrer: aReferrer ? aReferrer.spec : null,
       referrerPolicy: aReferrerPolicy,
       postData: aPostData ? Utils.serializeInputStream(aPostData) : null,
       headers: aHeaders ? Utils.serializeInputStream(aHeaders) : null,
       baseURI: aBaseURI ? aBaseURI.spec : null,
-      triggeringPrincipal: aTriggeringPrincipal
-                           ? Utils.serializePrincipal(aTriggeringPrincipal)
-                           : Services.scriptSecurityManager.createNullPrincipal({}),
+      triggeringPrincipal: Utils.serializePrincipal(
+          aTriggeringPrincipal || Services.scriptSecurityManager.createNullPrincipal({})),
       requestTime: Services.telemetry.msSystemNow(),
     });
   },
   setOriginAttributesBeforeLoading(aOriginAttributes) {
     this._sendMessage("WebNavigation:SetOriginAttributes", {
       originAttributes: aOriginAttributes,
     });
   },