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 499059 abf2e04e30e4bb0b9cb534926e4df492b9fecf0b
parent 499058 f5c1a7734493d3cf9e1ded5731bba0528b01155f
child 499060 daf7ced3bbccbbf3a17d2bdc3d65d97def353762
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [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,
     });
   },