Skip to content
Snippets Groups Projects
Commit 7a796ee3 authored by Andrew Sutherland's avatar Andrew Sutherland
Browse files

Bug 1341161 - Handle "dom.ipc.keepProcessesAlive.web" pref not existing,...

Bug 1341161 - Handle "dom.ipc.keepProcessesAlive.web" pref not existing, fixing permaorange on aurora. r=baku

--HG--
extra : rebase_source : 870812dc3d5ff08245ab24c6c7fa6994e3c65520
parent 71918375
No related branches found
No related tags found
No related merge requests found
......@@ -241,8 +241,16 @@ add_task(function*() {
// notifications of their shutdown to ensure we're avoiding shutdown races.
// (If there are races then the processes won't actually be shut down.) So
// it's easiest to just boost the limit.
let keepAliveCount =
SpecialPowers.getIntPref("dom.ipc.keepProcessesAlive.web", 1);
let keepAliveCount = 0;
try {
// This will throw if the preference is not defined, leaving our value at 0.
// Alternately, we could use Preferences.jsm's Preferences.get() API which
// supports default values, but we're sticking with SpecialPowers here for
// consistency.
keepAliveCount = SpecialPowers.getIntPref("dom.ipc.keepProcessesAlive.web");
} catch (ex) {
// Then zero is correct.
}
let safeProcessCount = keepAliveCount + 6;
info("dom.ipc.keepProcessesAlive.web is " + keepAliveCount + ", boosting " +
"process count temporarily to " + safeProcessCount);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment