Bug 924089 - 'Enable SharedWorker by default', r=ehsan+khuey.

This commit is contained in:
Ben Turner 2013-12-09 11:57:40 -08:00
parent cfa1847293
commit 22a3d70c8f
5 changed files with 11 additions and 8 deletions

View File

@ -454,6 +454,7 @@ var interfaceNamesInGlobalScope =
"SettingsLock",
"SettingsManager",
{name: "ShadowRoot", pref: "dom.webcomponents.enabled"},
{name: "SharedWorker", pref: "dom.workers.sharedWorkers.enabled"},
"SimpleGestureEvent",
{name: "SimpleTest", xbl: false},
"SmartCardEvent",

View File

@ -30,9 +30,9 @@
let testGenerator = (function() {
SimpleTest.waitForExplicitFinish();
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
ok(!("WorkerMessagePort" in window),
"No WorkerMessagePort without pref set");
if (!SpecialPowers.getBoolPref(swPref)) {
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
}
SpecialPowers.pushPrefEnv({ set: [[swPref, true]] }, sendToGenerator);
yield undefined;

View File

@ -22,9 +22,9 @@
let testGenerator = (function() {
SimpleTest.waitForExplicitFinish();
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
ok(!("WorkerMessagePort" in window),
"No WorkerMessagePort without pref set");
if (!SpecialPowers.getBoolPref(swPref)) {
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
}
SpecialPowers.pushPrefEnv({ set: [[swPref, true]] }, sendToGenerator);
yield undefined;

View File

@ -27,7 +27,9 @@
const errorLine = 86;
const errorColumn = 0;
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
if (!SpecialPowers.getBoolPref(swPref)) {
ok(!("SharedWorker" in window), "No SharedWorker without pref set");
}
SpecialPowers.pushPrefEnv({ set: [[swPref, true]] }, function() {
var worker = new SharedWorker(filename);

View File

@ -100,7 +100,7 @@ pref("dom.workers.enabled", true);
pref("dom.workers.maxPerDomain", 20);
// Whether or not Shared Web Workers are enabled.
pref("dom.workers.sharedWorkers.enabled", false);
pref("dom.workers.sharedWorkers.enabled", true);
// Whether nonzero values can be returned from performance.timing.*
pref("dom.enable_performance", true);