Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow
☠☠ backed out by f41766fb9407 ☠ ☠
authorPaul Bone <pbone@mozilla.com>
Thu, 16 Jan 2020 03:53:46 +0000
changeset 510428 051d6f3a237c14a883a3712360dafddeaf23b6c2
parent 510427 8f8a663e3118e347f8fc68fdedef56cabf067541
child 510429 e69960479b2ad9c896146229645a62da5bf3586f
push id37021
push userrmaries@mozilla.com
push dateThu, 16 Jan 2020 09:46:51 +0000
treeherdermozilla-central@7541d616ff87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1597154
milestone74.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 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D59823
docshell/base/nsDocShell.cpp
toolkit/modules/E10SUtils.jsm
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9371,17 +9371,17 @@ static bool IsConsideredSameOriginForUIR
   }
 
   channel.forget(aChannel);
   return NS_OK;
 }
 
 // Changes here should also be made in
 // E10SUtils.documentChannelPermittedForURI().
-static bool SchemeUsesDocChannel(nsIURI* aURI) {
+static bool URIUsesDocChannel(nsIURI* aURI) {
   if (SchemeIsJavascript(aURI) || NS_IsAboutBlank(aURI)) {
     return false;
   }
 
   nsCString spec = aURI->GetSpecOrDefault();
 
   if (spec.EqualsLiteral("about:printpreview") ||
       spec.EqualsLiteral("about:privatebrowsing") ||
@@ -9980,17 +9980,17 @@ nsresult nsDocShell::DoURILoad(nsDocShel
 
   // We want to use DocumentChannel if we're using a supported scheme, or if
   // we're a sandboxed srcdoc load. Non-sandboxed srcdoc loads need to share
   // the same principal object as their outer document (and must load in the
   // same process), which breaks if we serialize to the parent process.
   bool canUseDocumentChannel =
       aLoadState->HasLoadFlags(INTERNAL_LOAD_FLAGS_IS_SRCDOC)
           ? (sandboxFlags & SANDBOXED_ORIGIN)
-          : SchemeUsesDocChannel(aLoadState->URI());
+          : URIUsesDocChannel(aLoadState->URI());
 
   if (StaticPrefs::browser_tabs_documentchannel() && XRE_IsContentProcess() &&
       canUseDocumentChannel) {
     channel = new DocumentChannelChild(aLoadState, loadInfo, initiatorType,
                                        loadFlags, mLoadType, cacheKey, isActive,
                                        isTopLevelDoc, sandboxFlags);
     channel->SetNotificationCallbacks(this);
   } else if (!CreateAndConfigureRealChannelForLoadState(
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -140,18 +140,17 @@ const kSafeSchemes = [
 const kDocumentChannelDeniedSchemes = ["javascript"];
 const kDocumentChannelDeniedURIs = [
   "about:blank",
   "about:printpreview",
   "about:privatebrowsing",
   "about:crashcontent",
 ];
 
-// Changes here should also be made in SchemeUsesDocChannel in
-// nsDocShell.cpp.
+// Changes here should also be made in URIUsesDocChannel in nsDocShell.cpp.
 function documentChannelPermittedForURI(aURI) {
   return (
     !kDocumentChannelDeniedSchemes.includes(aURI.scheme) &&
     !kDocumentChannelDeniedURIs.includes(aURI.spec)
   );
 }
 
 // Note that even if the scheme fits the criteria for a web-handled scheme