Commit 9970ac54 authored by Paul Bone's avatar Paul Bone
Browse files

Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D59823

--HG--
extra : moz-landing-system : lando
parent 101d2ed4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9363,7 +9363,7 @@ static bool IsConsideredSameOriginForUIR(nsIPrincipal* aTriggeringPrincipal,

// 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;
  }
@@ -9895,7 +9895,7 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
  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) {
+1 −2
Original line number Diff line number Diff line
@@ -145,8 +145,7 @@ const kDocumentChannelDeniedURIs = [
  "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) &&