Backed out 4 changesets (bug 1592894) for failing in browser_httpResponseProcessSelection.js

Backed out changeset 2e3a515756cc (bug 1592894)
Backed out changeset f431b1c95887 (bug 1592894)
Backed out changeset d9fcadf796da (bug 1592894)
Backed out changeset 79a9d3e1e255 (bug 1592894)
This commit is contained in:
Noemi Erli 2019-12-03 04:09:56 +02:00
Родитель 9631373efa
Коммит 434c4a9abd
7 изменённых файлов: 38 добавлений и 21 удалений

Просмотреть файл

@ -516,6 +516,14 @@ pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
pref("security.allow_eval_with_system_principal", false);
pref("security.allow_eval_in_parent_process", false);
#ifdef NIGHTLY_BUILD
pref("browser.tabs.remote.useHTTPResponseProcessSelection", true);
#else
// Disabled outside of nightly due to bug 1554217
pref("browser.tabs.remote.useHTTPResponseProcessSelection", false);
#endif
// Unload tabs when available memory is running low
pref("browser.tabs.unloadOnLowMemory", false);

Просмотреть файл

@ -2607,10 +2607,6 @@ var SessionStoreInternal = {
// Examine the channel response to see if we should change the process
// performing the given load. aRequestor implements nsIProcessSwitchRequestor
onMayChangeProcess(aRequestor) {
if (!E10SUtils.documentChannel()) {
throw new Error("This code is only used by document channel");
}
let switchRequestor;
try {
switchRequestor = aRequestor.QueryInterface(Ci.nsIProcessSwitchRequestor);
@ -2648,7 +2644,10 @@ var SessionStoreInternal = {
let topDocShell = topBC.embedderElement.ownerGlobal.docShell;
let { useRemoteSubframes } = topDocShell.QueryInterface(Ci.nsILoadContext);
if (!useRemoteSubframes) {
if (!E10SUtils.useCrossOriginOpenerPolicy()) {
if (
!E10SUtils.useHttpResponseProcessSelection() &&
!E10SUtils.useCrossOriginOpenerPolicy()
) {
debug(
`[process-switch]: response process selection disabled - ignoring`
);

Просмотреть файл

@ -46,6 +46,7 @@ async function runTest() {
// requests to `ORIGIN` will be marked as controlled.
await SpecialPowers.pushPrefEnv({
set: [
["browser.tabs.remote.useHTTPResponseProcessSelection", true],
["browser.tabs.documentchannel", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.exemptFromPerDomainMax", true],
@ -113,12 +114,10 @@ async function runTest() {
info("Waiting for the browser to stop");
await BrowserTestUtils.browserStopped(tab.linkedBrowser);
if (SpecialPowers.useRemoteSubframes) {
Assert.ok(
E10SUtils.isWebRemoteType(tab.linkedBrowser.remoteType),
`${CROSS_ORIGIN_URL} should load in a web-content process`
);
}
Assert.ok(
E10SUtils.isWebRemoteType(tab.linkedBrowser.remoteType),
`${CROSS_ORIGIN_URL} should load in a web-content process`
);
// Step 3: cleanup.
info("Loading initial page to unregister all Service Workers");

Просмотреть файл

@ -17,6 +17,7 @@ add_task(async function() {
await SpecialPowers.pushPrefEnv({
set: [
["fission.preserve_browsing_contexts", true],
["browser.tabs.remote.useHTTPResponseProcessSelection", true],
["browser.tabs.documentchannel", true],
],
});

Просмотреть файл

@ -2,6 +2,8 @@ const { E10SUtils } = ChromeUtils.import(
"resource://gre/modules/E10SUtils.jsm"
);
const RESPONSE_PROCESS_SELECTION_PREF =
"browser.tabs.remote.useHTTPResponseProcessSelection";
const DOCUMENT_CHANNEL_PREF = "browser.tabs.documentchannel";
const FISSION_PREF = "fission.autostart";
const HISTORY = [
@ -119,14 +121,19 @@ async function runTest() {
});
}
add_task(async function prefNotSet() {
add_task(async function prefDisabled() {
await SpecialPowers.pushPrefEnv({
set: [[RESPONSE_PROCESS_SELECTION_PREF, false]],
});
await runTest();
});
add_task(async function prefEnabled() {
await SpecialPowers.pushPrefEnv({
set: [[DOCUMENT_CHANNEL_PREF, true]],
set: [
[RESPONSE_PROCESS_SELECTION_PREF, true],
[DOCUMENT_CHANNEL_PREF, true],
],
});
await runTest();
await SpecialPowers.popPrefEnv();
});

Просмотреть файл

@ -1,6 +1,9 @@
add_task(async function setupPrefs() {
await SpecialPowers.pushPrefEnv({
set: [["browser.tabs.documentchannel", true]],
set: [
["browser.tabs.remote.useHTTPResponseProcessSelection", true],
["browser.tabs.documentchannel", true],
],
});
});

Просмотреть файл

@ -57,8 +57,8 @@ XPCOMUtils.defineLazyPreferenceGetter(
);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"documentChannel",
"browser.tabs.documentchannel",
"useHttpResponseProcessSelection",
"browser.tabs.remote.useHTTPResponseProcessSelection",
false
);
XPCOMUtils.defineLazyPreferenceGetter(
@ -287,12 +287,12 @@ var E10SUtils = {
PRIVILEGEDMOZILLA_REMOTE_TYPE,
LARGE_ALLOCATION_REMOTE_TYPE,
useHttpResponseProcessSelection() {
return useHttpResponseProcessSelection;
},
useCrossOriginOpenerPolicy() {
return useCrossOriginOpenerPolicy;
},
documentChannel() {
return documentChannel;
},
/**
* Serialize csp data.
@ -768,7 +768,7 @@ var E10SUtils = {
// We should never be sending a POST request from the parent process to a
// http(s) uri, so make sure we switch if we're currently in that process.
if (
useRemoteSubframes &&
(useRemoteSubframes || useHttpResponseProcessSelection) &&
(aURI.scheme == "http" ||
aURI.scheme == "https" ||
aURI.scheme == "data") &&