зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1584031 - Add a pref to put data URIs in their own process when using fission. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D53894 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4e9f06f73c
Коммит
943ad54b32
|
@ -2705,6 +2705,10 @@ pref("browser.tabs.remote.autostart", false);
|
|||
// of file:// URIs.
|
||||
pref("browser.tabs.remote.separateFileUriProcess", true);
|
||||
|
||||
// Pref to control whether we put all data: uri's in the default
|
||||
// web process when running with fission.
|
||||
pref("browser.tabs.remote.dataUriInDefaultWebProcess", false);
|
||||
|
||||
// Pref that enables top level web content pages that are opened from file://
|
||||
// URI pages to run in the file content process.
|
||||
// This has been added in case breaking any window references between these
|
||||
|
|
|
@ -23,6 +23,12 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
"browser.tabs.remote.separateFileUriProcess",
|
||||
false
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"useSeparateDataUriProcess",
|
||||
"browser.tabs.remote.dataUriInDefaultWebProcess",
|
||||
false
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"allowLinkedWebInFileUriProcess",
|
||||
|
@ -535,11 +541,17 @@ var E10SUtils = {
|
|||
throw Cr.NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
// Null principals can be loaded in any remote process.
|
||||
// Null principals can be loaded in any remote process, but when
|
||||
// using fission we add the option to force them into the default
|
||||
// web process for better test coverage.
|
||||
if (aPrincipal.isNullPrincipal) {
|
||||
return aPreferredRemoteType == NOT_REMOTE
|
||||
? DEFAULT_REMOTE_TYPE
|
||||
: aPreferredRemoteType;
|
||||
if (
|
||||
(aRemoteSubframes && useSeparateDataUriProcess) ||
|
||||
aPreferredRemoteType == NOT_REMOTE
|
||||
) {
|
||||
return WEB_REMOTE_TYPE;
|
||||
}
|
||||
return aPreferredRemoteType;
|
||||
}
|
||||
|
||||
// We might care about the currently loaded URI. Pull it out of our current
|
||||
|
@ -759,7 +771,9 @@ var E10SUtils = {
|
|||
// http(s) uri, so make sure we switch if we're currently in that process.
|
||||
if (
|
||||
(useRemoteSubframes || useHttpResponseProcessSelection) &&
|
||||
(aURI.scheme == "http" || aURI.scheme == "https") &&
|
||||
(aURI.scheme == "http" ||
|
||||
aURI.scheme == "https" ||
|
||||
aURI.scheme == "data") &&
|
||||
Services.appinfo.remoteType != NOT_REMOTE
|
||||
) {
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче