mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1343184 Part 1: Add pref to allow linked web content to load in file content process. r=Gijs
This commit is contained in:
parent
be336a41e9
commit
5d9d45404e
@ -15,6 +15,8 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "useRemoteWebExtensions",
|
||||
"extensions.webextensions.remote", false);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "useSeparateFileUriProcess",
|
||||
"browser.tabs.remote.separateFileUriProcess", false);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "allowLinkedWebInFileUriProcess",
|
||||
"browser.tabs.remote.allowLinkedWebInFileUriProcess", false);
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Utils",
|
||||
"resource://gre/modules/sessionstore/Utils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "console",
|
||||
@ -45,8 +47,20 @@ const LARGE_ALLOCATION_REMOTE_TYPE = "webLargeAllocation";
|
||||
const DEFAULT_REMOTE_TYPE = WEB_REMOTE_TYPE;
|
||||
|
||||
function validatedWebRemoteType(aPreferredRemoteType) {
|
||||
return aPreferredRemoteType && aPreferredRemoteType.startsWith(WEB_REMOTE_TYPE)
|
||||
? aPreferredRemoteType : WEB_REMOTE_TYPE;
|
||||
if (!aPreferredRemoteType) {
|
||||
return WEB_REMOTE_TYPE;
|
||||
}
|
||||
|
||||
if (aPreferredRemoteType.startsWith(WEB_REMOTE_TYPE)) {
|
||||
return aPreferredRemoteType;
|
||||
}
|
||||
|
||||
if (allowLinkedWebInFileUriProcess &&
|
||||
aPreferredRemoteType == FILE_REMOTE_TYPE) {
|
||||
return aPreferredRemoteType;
|
||||
}
|
||||
|
||||
return WEB_REMOTE_TYPE;
|
||||
}
|
||||
|
||||
this.E10SUtils = {
|
||||
|
@ -2930,6 +2930,13 @@ pref("browser.tabs.remote.separateFileUriProcess", true);
|
||||
pref("browser.tabs.remote.separateFileUriProcess", false);
|
||||
#endif
|
||||
|
||||
// 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
|
||||
// sorts of pages, which we have to do when we run them in the normal web
|
||||
// content process, causes compatibility issues.
|
||||
pref("browser.tabs.remote.allowLinkedWebInFileUriProcess", false);
|
||||
|
||||
// Enable caching of Moz2D Path objects for SVG geometry elements
|
||||
pref("svg.path-caching.enabled", true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user