From 55a6e2ac80406889f00625fa15f2c4f7d4709339 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Fri, 24 Apr 2020 01:46:25 +0000 Subject: [PATCH] Bug 1607984 - P17. Put ParentProcessDocumentChannel behind a pref. r=necko-reviewers,mattwoodrow We disable it for now, until some remaining failures are sorted out. Differential Revision: https://phabricator.services.mozilla.com/D71875 --- modules/libpref/init/StaticPrefList.yaml | 5 +++++ netwerk/ipc/DocumentChannel.cpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 91505eba6338..711e865013dd 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -979,6 +979,11 @@ value: true mirror: always +- name: browser.tabs.documentchannel.ppdc + type: bool + value: false + mirror: always + - name: browser.tabs.remote.desktopbehavior type: bool value: false diff --git a/netwerk/ipc/DocumentChannel.cpp b/netwerk/ipc/DocumentChannel.cpp index d8625a2688fa..26e701f85a7c 100644 --- a/netwerk/ipc/DocumentChannel.cpp +++ b/netwerk/ipc/DocumentChannel.cpp @@ -153,6 +153,12 @@ static bool URIUsesDocChannel(nsIURI* aURI) { bool DocumentChannel::CanUseDocumentChannel(nsDocShellLoadState* aLoadState) { MOZ_ASSERT(aLoadState); + + if (XRE_IsParentProcess() && + !StaticPrefs::browser_tabs_documentchannel_ppdc()) { + return false; + } + // We want to use DocumentChannel if we're using a supported scheme. Sandboxed // srcdoc loads break due to failing assertions after changing processes, and // non-sandboxed srcdoc loads need to share the same principal object as their