Bug 1496220 - 1. Serialize default null principal in RemoteWebNavigation; r=jkt
☠☠ backed out by 47e77fc9d699 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Wed, 17 Oct 2018 16:12:21 +0000
changeset 497450 c4a8a6256d7f800bd2d592bc6467bcfef5cd9309
parent 497449 480c167630359dfb2b683f3f4c876a27a637635e
child 497451 670b75f8446faa1b7368442f142b685288cc7bb8
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 - 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,
     });
   },