Bug 1549168 - Remove use of principal SerializationHelper in browser.js and replace with E10S.serializePrincipal. r=ckerschb
authorJonathan Kingston <jkt@mozilla.com>
Sun, 05 May 2019 13:43:10 +0000
changeset 531449 5fe8a5adca365edc23c9664717943696de84461d
parent 531448 1574bf33c611d100ffdff6f1a6b0fffb24c99592
child 531450 a08af741bd23f9837b6dc6aa74829fbe933568e4
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb
bugs1549168
milestone68.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 1549168 - Remove use of principal SerializationHelper in browser.js and replace with E10S.serializePrincipal. r=ckerschb Differential Revision: https://phabricator.services.mozilla.com/D29958
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1248,17 +1248,17 @@ function _loadURI(browser, uri, params =
 
       if (postData) {
         postData = serializeInputStream(postData);
       }
 
       let loadParams = {
         uri,
         triggeringPrincipal: triggeringPrincipal
-          ? gSerializationHelper.serializeToString(triggeringPrincipal)
+          ? E10SUtils.serializePrincipal(triggeringPrincipal)
           : null,
         flags,
         referrerInfo: E10SUtils.serializeReferrerInfo(referrerInfo),
         remoteType: requiredRemoteType,
         postData,
         newFrameloader,
         csp: csp ? gSerializationHelper.serializeToString(csp) : null,
       };
@@ -3518,19 +3518,17 @@ function BrowserReloadWithFlags(reloadFl
                            { flags: reloadFlags, handlingUserInput });
   }
 }
 
 function getSecurityInfo(securityInfoAsString) {
   if (!securityInfoAsString)
     return null;
 
-  const serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
-                       .getService(Ci.nsISerializationHelper);
-  let securityInfo = serhelper.deserializeObject(securityInfoAsString);
+  let securityInfo = gSerializationHelper.deserializeObject(securityInfoAsString);
   securityInfo.QueryInterface(Ci.nsITransportSecurityInfo);
 
   return securityInfo;
 }
 
 /**
  * Returns a string with detailed information about the certificate validation
  * failure from the specified URI that can be used to send a report.