Bug 1234054 - Only enable service worker notifications on Desktop and non-release B2G/Android. r=ehsan

--HG--
extra : commitid : J5ruuRyO0K8
extra : rebase_source : b115b91a5d809b3b73fea5e1b45a3602a1fb5748
This commit is contained in:
Kit Cambridge 2016-01-05 15:53:43 -07:00
parent b4efbefbd2
commit 9298b42468
3 changed files with 11 additions and 4 deletions

View File

@ -1611,6 +1611,7 @@ pref("view_source.tab", true);
pref("dom.serviceWorkers.enabled", true);
pref("dom.serviceWorkers.interception.enabled", true);
pref("dom.serviceWorkers.openWindow.enabled", true);
pref("dom.webnotifications.serviceworker.enabled", true);
// Enable Push API.
pref("dom.push.enabled", true);

View File

@ -157,9 +157,11 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"MessagePort",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "Notification", release: false },
{ name: "Notification", nonReleaseB2G: true, nonReleaseAndroid: true,
b2g: false, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "NotificationEvent", release: false },
{ name: "NotificationEvent", nonReleaseB2G: true, nonReleaseAndroid: true,
b2g: false, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
"Performance",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -226,9 +228,11 @@ function createInterfaceMap(permissionMap, version, userAgent, isB2G) {
} else {
ok(!("pref" in entry), "Bogus pref annotation for " + entry.name);
if ((entry.nightly === !isNightly) ||
(entry.nonReleaseB2G === !(isB2G && !isRelease) && isB2G) ||
(entry.nonReleaseAndroid === !(isAndroid && !isRelease) && isAndroid) ||
(entry.desktop === !isDesktop) ||
(entry.android === !isAndroid) ||
(entry.b2g === !isB2G) ||
(entry.android === !isAndroid && !entry.nonReleaseAndroid) ||
(entry.b2g === !isB2G && !entry.nonReleaseB2G) ||
(entry.release === !isRelease) ||
(entry.permission && !permissionMap[entry.permission])) {
interfaceMap[entry.name] = false;

View File

@ -4460,7 +4460,9 @@ pref("notification.feature.enabled", false);
// Web Notification
pref("dom.webnotifications.enabled", true);
#if !defined(RELEASE_BUILD)
pref("dom.webnotifications.serviceworker.enabled", true);
#endif
// Alert animation effect, name is disableSlidingEffect for backwards-compat.
pref("alerts.disableSlidingEffect", false);