mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Revert one process per tab, regression in backspace handling
This commit is contained in:
parent
c8833bbb37
commit
f342f6ce12
3 changed files with 6 additions and 19 deletions
|
|
@ -924,10 +924,8 @@ pref("dom.ipc.shims.enabledWarnings", false);
|
||||||
pref("browser.tabs.remote.autostart", true);
|
pref("browser.tabs.remote.autostart", true);
|
||||||
pref("browser.tabs.remote.desktopbehavior", true);
|
pref("browser.tabs.remote.desktopbehavior", true);
|
||||||
pref("browser.tabs.remote.ignoreBlockPolicy", true);
|
pref("browser.tabs.remote.ignoreBlockPolicy", true);
|
||||||
// -1 means automatic tab-isolation mode: try one process per tab.
|
// Number of web content processes used by e10s.
|
||||||
pref("dom.ipc.processCount", -1);
|
pref("dom.ipc.processCount", 2);
|
||||||
// Safety ceiling used by automatic tab-isolation mode.
|
|
||||||
pref("dom.ipc.processCount.webIsolatedMax", 64);
|
|
||||||
|
|
||||||
// This pref governs whether we attempt to work around problems caused by
|
// This pref governs whether we attempt to work around problems caused by
|
||||||
// plugins using OS calls to manipulate the cursor while running out-of-
|
// plugins using OS calls to manipulate the cursor while running out-of-
|
||||||
|
|
|
||||||
|
|
@ -574,7 +574,6 @@ ContentParent::GetNewOrUsedBrowserProcess(bool aForBrowserElement,
|
||||||
{
|
{
|
||||||
nsTArray<ContentParent*>* contentParents;
|
nsTArray<ContentParent*>* contentParents;
|
||||||
int32_t maxContentParents;
|
int32_t maxContentParents;
|
||||||
bool preferDedicatedProcess = false;
|
|
||||||
|
|
||||||
// Decide which pool of content parents we are going to be pulling from based
|
// Decide which pool of content parents we are going to be pulling from based
|
||||||
// on the aLargeAllocationProcess flag.
|
// on the aLargeAllocationProcess flag.
|
||||||
|
|
@ -592,20 +591,13 @@ ContentParent::GetNewOrUsedBrowserProcess(bool aForBrowserElement,
|
||||||
contentParents = sBrowserContentParents;
|
contentParents = sBrowserContentParents;
|
||||||
|
|
||||||
maxContentParents = Preferences::GetInt("dom.ipc.processCount", 1);
|
maxContentParents = Preferences::GetInt("dom.ipc.processCount", 1);
|
||||||
if (maxContentParents == -1) {
|
|
||||||
// Automatic mode: create a dedicated content process per new tab until
|
|
||||||
// a safety ceiling is reached, then reuse existing processes.
|
|
||||||
preferDedicatedProcess = true;
|
|
||||||
maxContentParents = Preferences::GetInt("dom.ipc.processCount.webIsolatedMax", 64);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxContentParents < 1) {
|
if (maxContentParents < 1) {
|
||||||
maxContentParents = 1;
|
maxContentParents = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!preferDedicatedProcess ||
|
if (contentParents->Length() >= uint32_t(maxContentParents)) {
|
||||||
contentParents->Length() >= uint32_t(maxContentParents)) {
|
|
||||||
uint32_t maxSelectable = std::min(static_cast<uint32_t>(contentParents->Length()),
|
uint32_t maxSelectable = std::min(static_cast<uint32_t>(contentParents->Length()),
|
||||||
static_cast<uint32_t>(maxContentParents));
|
static_cast<uint32_t>(maxContentParents));
|
||||||
uint32_t startIdx = rand() % maxSelectable;
|
uint32_t startIdx = rand() % maxSelectable;
|
||||||
|
|
|
||||||
|
|
@ -4203,12 +4203,6 @@ MultiprocessBlockPolicy() {
|
||||||
}
|
}
|
||||||
gMultiprocessBlockPolicyInitialized = true;
|
gMultiprocessBlockPolicyInitialized = true;
|
||||||
|
|
||||||
// Allow downstream applications to bypass legacy e10s block policies.
|
|
||||||
// This is evaluated at startup and requires restart to take effect.
|
|
||||||
if (Preferences::GetBool("browser.tabs.remote.ignoreBlockPolicy", false)) {
|
|
||||||
return gMultiprocessBlockPolicy;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Avoids enabling e10s if there are add-ons installed.
|
* Avoids enabling e10s if there are add-ons installed.
|
||||||
*/
|
*/
|
||||||
|
|
@ -4252,6 +4246,9 @@ MultiprocessBlockPolicy() {
|
||||||
gMultiprocessBlockPolicy = kE10sDisabledForAccessibility;
|
gMultiprocessBlockPolicy = kE10sDisabledForAccessibility;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We do not support E10S, block by policy.
|
||||||
|
gMultiprocessBlockPolicy = kE10sForceDisabled;
|
||||||
|
|
||||||
return gMultiprocessBlockPolicy;
|
return gMultiprocessBlockPolicy;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue