diff --git a/dom/base/nsDOMCID.h b/dom/base/nsDOMCID.h index 5d94b585f6e6..97dffb492fbc 100644 --- a/dom/base/nsDOMCID.h +++ b/dom/base/nsDOMCID.h @@ -21,12 +21,9 @@ 0x45f27d10, 0x987b, 0x11d2, \ {0xbd, 0x40, 0x00, 0x10, 0x5a, 0xa4, 0x5e, 0x89} } -#define SERVICEWORKERPERIODICUPDATER_CONTRACTID \ - "@mozilla.org/service-worker-periodic-updater;1" - //The dom cannot provide the crypto or pkcs11 classes that //were used in older days, so if someone wants to provide -//the service they must implement an object and give it +//the service they must implement an object and give it //this class ID #define NS_CRYPTO_CONTRACTID "@mozilla.org/security/crypto;1" #define NS_PKCS11_CONTRACTID "@mozilla.org/security/pkcs11;1" diff --git a/dom/interfaces/base/nsIServiceWorkerManager.idl b/dom/interfaces/base/nsIServiceWorkerManager.idl index 0793e2dedfd5..85aedf1c1f2b 100644 --- a/dom/interfaces/base/nsIServiceWorkerManager.idl +++ b/dom/interfaces/base/nsIServiceWorkerManager.idl @@ -34,7 +34,7 @@ interface nsIServiceWorkerInfo : nsISupports readonly attribute DOMString waitingCacheName; }; -[scriptable, builtinclass, uuid(8fb9db4f-1d04-402b-9c37-542da06e03b9)] +[scriptable, builtinclass, uuid(10f80c8c-7bf5-479e-a8d8-12ef50c802e8)] interface nsIServiceWorkerManager : nsISupports { /** @@ -145,8 +145,6 @@ interface nsIServiceWorkerManager : nsISupports [optional, array, size_is(aDataLength)] in uint8_t aDataBytes); void sendPushSubscriptionChangeEvent(in ACString aOriginAttributes, in ACString scope); - - void updateAllRegistrations(); }; %{ C++ diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 00bcbc7890bb..d1c0638b35d6 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -81,7 +81,6 @@ #include "nsIMutable.h" #include "nsIObserverService.h" #include "nsIScriptSecurityManager.h" -#include "nsIServiceWorkerManager.h" #include "nsScreenManagerProxy.h" #include "nsMemoryInfoDumper.h" #include "nsServiceManagerUtils.h" @@ -1434,16 +1433,6 @@ ContentChild::RecvBidiKeyboardNotify(const bool& aIsLangRTL) return true; } -bool -ContentChild::RecvUpdateServiceWorkerRegistrations() -{ - nsCOMPtr swm = mozilla::services::GetServiceWorkerManager(); - if (swm) { - swm->UpdateAllRegistrations(); - } - return true; -} - static CancelableTask* sFirstIdleTask; static void FirstIdle(void) diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index df3d273e58f8..9f5b2a3c7b11 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -329,8 +329,6 @@ public: virtual bool RecvBidiKeyboardNotify(const bool& isLangRTL) override; - virtual bool RecvUpdateServiceWorkerRegistrations() override; - virtual bool RecvNotifyVisited(const URIParams& aURI) override; // auto remove when alertfinished is received. nsresult AddRemoteAlertObserver(const nsString& aData, nsIObserver* aObserver); diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index ffb39380f258..7651cd49dc15 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -521,8 +521,6 @@ child: */ async BidiKeyboardNotify(bool isLangRTL); - async UpdateServiceWorkerRegistrations(); - async DataStoreNotify(uint32_t aAppId, nsString aName, nsString aManifestURL); diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index b13b18a6c518..00073a92ef65 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -3926,23 +3926,6 @@ ServiceWorkerManager::RemoveAllRegistrations(OriginAttributes* aParams) } } -NS_IMETHODIMP -ServiceWorkerManager::UpdateAllRegistrations() -{ - AssertIsOnMainThread(); - - for (auto it1 = mRegistrationInfos.Iter(); !it1.Done(); it1.Next()) { - for (auto it2 = it1.UserData()->mInfos.Iter(); !it2.Done(); it2.Next()) { - ServiceWorkerRegistrationInfo* info = it2.UserData(); - MOZ_ASSERT(!info->mScope.IsEmpty()); - - SoftUpdate(info->mPrincipal, info->mScope); - } - } - - return NS_OK; -} - NS_IMETHODIMP ServiceWorkerManager::Observe(nsISupports* aSubject, const char* aTopic, diff --git a/dom/workers/ServiceWorkerPeriodicUpdater.cpp b/dom/workers/ServiceWorkerPeriodicUpdater.cpp deleted file mode 100644 index 941cc5a54a16..000000000000 --- a/dom/workers/ServiceWorkerPeriodicUpdater.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "ServiceWorkerPeriodicUpdater.h" -#include "mozilla/ClearOnShutdown.h" -#include "mozilla/unused.h" -#include "mozilla/Services.h" -#include "mozilla/Preferences.h" -#include "mozilla/dom/ContentParent.h" -#include "nsIServiceWorkerManager.h" - -#define OBSERVER_TOPIC_IDLE_DAILY "idle-daily" - -namespace mozilla { -namespace dom { -namespace workers { - -NS_IMPL_ISUPPORTS(ServiceWorkerPeriodicUpdater, nsIObserver) - -StaticRefPtr -ServiceWorkerPeriodicUpdater::sInstance; -bool -ServiceWorkerPeriodicUpdater::sPeriodicUpdatesEnabled = true; - -already_AddRefed -ServiceWorkerPeriodicUpdater::GetSingleton() -{ - MOZ_ASSERT(XRE_IsParentProcess()); - - if (!sInstance) { - sInstance = new ServiceWorkerPeriodicUpdater(); - ClearOnShutdown(&sInstance); - } - RefPtr copy(sInstance.get()); - return copy.forget(); -} - -ServiceWorkerPeriodicUpdater::ServiceWorkerPeriodicUpdater() -{ - Preferences::AddBoolVarCache(&sPeriodicUpdatesEnabled, - "dom.serviceWorkers.periodic-updates.enabled", - true); -} - -ServiceWorkerPeriodicUpdater::~ServiceWorkerPeriodicUpdater() -{ -} - -NS_IMETHODIMP -ServiceWorkerPeriodicUpdater::Observe(nsISupports* aSubject, - const char* aTopic, - const char16_t* aData) -{ - // In tests, the pref is set to false so that the idle-daily service does not - // trigger updates leading to intermittent failures. - // We're called from SpecialPowers inside tests, in which case we need to - // update during the test run, for which we use a non-empty aData. - NS_NAMED_LITERAL_STRING(CallerSpecialPowers, "Caller:SpecialPowers"); - if (strcmp(aTopic, OBSERVER_TOPIC_IDLE_DAILY) == 0 && - (sPeriodicUpdatesEnabled || (aData && CallerSpecialPowers.Equals(aData)))) { - // First, update all registrations in the parent process. - nsCOMPtr swm = - mozilla::services::GetServiceWorkerManager(); - if (swm) { - swm->UpdateAllRegistrations(); - } - - // Now, tell all child processes to update their registrations as well. - nsTArray children; - ContentParent::GetAll(children); - for (uint32_t i = 0; i < children.Length(); i++) { - Unused << children[i]->SendUpdateServiceWorkerRegistrations(); - } - } - - return NS_OK; -} - -} // namespace workers -} // namespace dom -} // namespace mozilla diff --git a/dom/workers/ServiceWorkerPeriodicUpdater.h b/dom/workers/ServiceWorkerPeriodicUpdater.h deleted file mode 100644 index 134e245bca43..000000000000 --- a/dom/workers/ServiceWorkerPeriodicUpdater.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef mozilla_ServiceWorkerPeriodicUpdater_h -#define mozilla_ServiceWorkerPeriodicUpdater_h - -#include "nsCOMPtr.h" -#include "nsIObserver.h" -#include "mozilla/StaticPtr.h" - -namespace mozilla { -namespace dom { -namespace workers { - -/** - * This XPCOM component is main-process only, which means that it will never - * get instantiated in child processes. When we receive the idle-daily - * notification in this component, we iterate over all PContent children, and - * send each one a message that will trigger a call to - * nsIServiceWorkerManager::UpdateAllRegistrations() in all child processes. - */ - -class ServiceWorkerPeriodicUpdater final : public nsIObserver -{ -public: - NS_DECL_ISUPPORTS - NS_DECL_NSIOBSERVER - - static already_AddRefed GetSingleton(); - -private: - ServiceWorkerPeriodicUpdater(); - ~ServiceWorkerPeriodicUpdater(); - - static StaticRefPtr sInstance; - static bool sPeriodicUpdatesEnabled; -}; - -} // namespace workers -} // namespace dom -} // namespace mozilla - -#endif diff --git a/dom/workers/moz.build b/dom/workers/moz.build index c8e2f2792e24..9512f57c21e7 100644 --- a/dom/workers/moz.build +++ b/dom/workers/moz.build @@ -20,7 +20,6 @@ EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom.workers += [ 'ServiceWorkerManager.h', - 'ServiceWorkerPeriodicUpdater.h', 'WorkerDebuggerManager.h', 'Workers.h', ] @@ -73,7 +72,6 @@ UNIFIED_SOURCES += [ 'ServiceWorkerManagerParent.cpp', 'ServiceWorkerManagerService.cpp', 'ServiceWorkerMessageEvent.cpp', - 'ServiceWorkerPeriodicUpdater.cpp', 'ServiceWorkerPrivate.cpp', 'ServiceWorkerRegistrar.cpp', 'ServiceWorkerRegistration.cpp', diff --git a/dom/workers/test/serviceworkers/mochitest.ini b/dom/workers/test/serviceworkers/mochitest.ini index 55e4745dd83e..86e48dc6b41f 100644 --- a/dom/workers/test/serviceworkers/mochitest.ini +++ b/dom/workers/test/serviceworkers/mochitest.ini @@ -131,12 +131,6 @@ support-files = worker_updatefoundevent2.js updatefoundevent.html empty.js - periodic_update_test.js - periodic.sjs - periodic/frame.html - periodic/register.html - periodic/wait_for_update.html - periodic/unregister.html notification_constructor_error.js notification_get_sw.js notification/register.html diff --git a/dom/workers/test/serviceworkers/periodic.sjs b/dom/workers/test/serviceworkers/periodic.sjs deleted file mode 100644 index 6fc89d392191..000000000000 --- a/dom/workers/test/serviceworkers/periodic.sjs +++ /dev/null @@ -1,24 +0,0 @@ -function handleRequest(request, response) { - var stateName = request.scheme + 'periodiccounter'; - if (request.queryString == 'clearcounter') { - setState(stateName, ''); - return; - } - - if (!getState(stateName)) { - setState(stateName, '1'); - } else { - // Make sure that we pass a string value to setState! - setState(stateName, "" + (parseInt(getState(stateName)) + 1)); - } - response.setHeader("Content-Type", "application/javascript", false); - response.write(getScript(stateName)); -} - -function getScript(stateName) { - return "onfetch = function(e) {" + - "if (e.request.url.indexOf('get-sw-version') > -1) {" + - "e.respondWith(new Response('" + getState(stateName) + "'));" + - "}" + - "};"; -} diff --git a/dom/workers/test/serviceworkers/periodic/frame.html b/dom/workers/test/serviceworkers/periodic/frame.html deleted file mode 100644 index 3bb68cc70011..000000000000 --- a/dom/workers/test/serviceworkers/periodic/frame.html +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/dom/workers/test/serviceworkers/periodic/register.html b/dom/workers/test/serviceworkers/periodic/register.html deleted file mode 100644 index ebfd53d87696..000000000000 --- a/dom/workers/test/serviceworkers/periodic/register.html +++ /dev/null @@ -1,9 +0,0 @@ - - diff --git a/dom/workers/test/serviceworkers/periodic/unregister.html b/dom/workers/test/serviceworkers/periodic/unregister.html deleted file mode 100644 index 0315f25b36af..000000000000 --- a/dom/workers/test/serviceworkers/periodic/unregister.html +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/dom/workers/test/serviceworkers/periodic/wait_for_update.html b/dom/workers/test/serviceworkers/periodic/wait_for_update.html deleted file mode 100644 index 71a9ba13e967..000000000000 --- a/dom/workers/test/serviceworkers/periodic/wait_for_update.html +++ /dev/null @@ -1,15 +0,0 @@ - - diff --git a/dom/workers/test/serviceworkers/periodic_update_test.js b/dom/workers/test/serviceworkers/periodic_update_test.js deleted file mode 100644 index 3aff493ff9ba..000000000000 --- a/dom/workers/test/serviceworkers/periodic_update_test.js +++ /dev/null @@ -1,75 +0,0 @@ -var oldSWVersion, newSWVersion; -// This will be set by the test to the base directory for the test files. -var gPrefix; - -function start() { - const Cc = SpecialPowers.Cc; - const Ci = SpecialPowers.Ci; - - function testVersion() { - // Verify that the service worker has been correctly updated. - testFrame(gPrefix + "periodic/frame.html").then(function(body) { - newSWVersion = parseInt(body); - is(newSWVersion, 2, "Expected correct new version"); - ok(newSWVersion > oldSWVersion, - "The SW should be successfully updated, old: " + oldSWVersion + - ", new: " + newSWVersion); - unregisterSW().then(function() { - SimpleTest.finish(); - }); - }); - } - - registerSW().then(function() { - return testFrame(gPrefix + "periodic/frame.html").then(function(body) { - oldSWVersion = parseInt(body); - is(oldSWVersion, 1, "Expected correct old version"); - }); - }).then(function() { - return testFrame(gPrefix + "periodic/wait_for_update.html"); - }).then(function() { - return testVersion(); - }); -} - -function testFrame(src) { - return new Promise(function(resolve, reject) { - var iframe = document.createElement("iframe"); - iframe.src = src; - window.onmessage = function(e) { - if (e.data.status == "callback") { - window.onmessage = null; - var result = e.data.data; - iframe.src = "about:blank"; - document.body.removeChild(iframe); - iframe = null; - SpecialPowers.exactGC(window, function() { - resolve(result); - }); - } - }; - document.body.appendChild(iframe); - }); -} - -function registerSW() { - return testFrame(gPrefix + "periodic/register.html"); -} - -function unregisterSW() { - return testFrame(gPrefix + "periodic/unregister.html"); -} - -function runTheTest() { - SimpleTest.waitForExplicitFinish(); - - SpecialPowers.pushPrefEnv({"set": [ - ["dom.serviceWorkers.exemptFromPerDomainMax", true], - ["dom.serviceWorkers.interception.enabled", true], - ["dom.serviceWorkers.enabled", true], - ["dom.serviceWorkers.testing.enabled", true], - ['dom.serviceWorkers.interception.enabled', true], - ]}, function() { - start(); - }); -} diff --git a/dom/workers/test/serviceworkers/test_periodic_https_update.html b/dom/workers/test/serviceworkers/test_periodic_https_update.html deleted file mode 100644 index 4a84dd92e8be..000000000000 --- a/dom/workers/test/serviceworkers/test_periodic_https_update.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Bug 1159378 - Test the periodic update of service workers - - - - - -

- -

-
-
-
-
-
diff --git a/dom/workers/test/serviceworkers/test_periodic_update.html b/dom/workers/test/serviceworkers/test_periodic_update.html
deleted file mode 100644
index 58ec16128887..000000000000
--- a/dom/workers/test/serviceworkers/test_periodic_update.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-  Bug 1112469 - Test the periodic update of service workers
-  
-  
-  
-
-
-

- -

-
-
-
-
-
diff --git a/layout/build/nsLayoutCID.h b/layout/build/nsLayoutCID.h
index e48fc281d2d8..5e7d639b86cc 100644
--- a/layout/build/nsLayoutCID.h
+++ b/layout/build/nsLayoutCID.h
@@ -82,8 +82,4 @@
 #define SERVICEWORKERMANAGER_CID \
 { 0xc74bde32, 0xbcc7, 0x4840, { 0x84, 0x30, 0xc7, 0x33, 0x35, 0x1b, 0x21, 0x2a } }
 
-// {91f43ef6-8159-457a-ba68-249c3ff7a06a}
-#define SERVICEWORKERPERIODICUPDATER_CID \
-{ 0x91f43ef6, 0x8159, 0x457a, { 0xba, 0x68, 0x24, 0x9c, 0x3f, 0xf7, 0xa0, 0x6a } }
-
 #endif /* nsLayoutCID_h__ */
diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp
index 9185e4be8375..ce7e5de03e97 100644
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -89,7 +89,6 @@
 #include "mozilla/dom/network/UDPSocketChild.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/dom/workers/ServiceWorkerManager.h"
-#include "mozilla/dom/workers/ServiceWorkerPeriodicUpdater.h"
 #include "mozilla/dom/workers/WorkerDebuggerManager.h"
 #include "mozilla/OSFileConstants.h"
 #include "mozilla/Services.h"
@@ -272,7 +271,6 @@ using mozilla::dom::alarm::AlarmHalService;
 using mozilla::dom::power::PowerManagerService;
 using mozilla::dom::quota::QuotaManager;
 using mozilla::dom::workers::ServiceWorkerManager;
-using mozilla::dom::workers::ServiceWorkerPeriodicUpdater;
 using mozilla::dom::workers::WorkerDebuggerManager;
 using mozilla::dom::UDPSocketChild;
 using mozilla::dom::time::TimeService;
@@ -320,8 +318,6 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(QuotaManager,
                                          QuotaManager::FactoryCreate)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ServiceWorkerManager,
                                          ServiceWorkerManager::GetInstance)
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ServiceWorkerPeriodicUpdater,
-                                         ServiceWorkerPeriodicUpdater::GetSingleton)
 NS_GENERIC_FACTORY_CONSTRUCTOR(WorkerDebuggerManager)
 
 #ifdef MOZ_WIDGET_GONK
@@ -771,7 +767,6 @@ NS_DEFINE_NAMED_CID(NS_TEXTEDITOR_CID);
 NS_DEFINE_NAMED_CID(DOMREQUEST_SERVICE_CID);
 NS_DEFINE_NAMED_CID(QUOTA_MANAGER_CID);
 NS_DEFINE_NAMED_CID(SERVICEWORKERMANAGER_CID);
-NS_DEFINE_NAMED_CID(SERVICEWORKERPERIODICUPDATER_CID);
 NS_DEFINE_NAMED_CID(WORKERDEBUGGERMANAGER_CID);
 #ifdef MOZ_WIDGET_GONK
 NS_DEFINE_NAMED_CID(SYSTEMWORKERMANAGER_CID);
@@ -1081,7 +1076,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
   { &kDOMREQUEST_SERVICE_CID, false, nullptr, DOMRequestServiceConstructor },
   { &kQUOTA_MANAGER_CID, false, nullptr, QuotaManagerConstructor },
   { &kSERVICEWORKERMANAGER_CID, false, nullptr, ServiceWorkerManagerConstructor },
-  { &kSERVICEWORKERPERIODICUPDATER_CID, false, nullptr, ServiceWorkerPeriodicUpdaterConstructor },
   { &kWORKERDEBUGGERMANAGER_CID, true, nullptr, WorkerDebuggerManagerConstructor },
 #ifdef MOZ_WIDGET_GONK
   { &kSYSTEMWORKERMANAGER_CID, true, nullptr, SystemWorkerManagerConstructor },
@@ -1251,7 +1245,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
   { DOMREQUEST_SERVICE_CONTRACTID, &kDOMREQUEST_SERVICE_CID },
   { QUOTA_MANAGER_CONTRACTID, &kQUOTA_MANAGER_CID },
   { SERVICEWORKERMANAGER_CONTRACTID, &kSERVICEWORKERMANAGER_CID },
-  { SERVICEWORKERPERIODICUPDATER_CONTRACTID, &kSERVICEWORKERPERIODICUPDATER_CID, Module::MAIN_PROCESS_ONLY },
   { WORKERDEBUGGERMANAGER_CONTRACTID, &kWORKERDEBUGGERMANAGER_CID },
 #ifdef MOZ_WIDGET_GONK
   { SYSTEMWORKERMANAGER_CONTRACTID, &kSYSTEMWORKERMANAGER_CID },
@@ -1367,7 +1360,6 @@ static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
 #endif
   { "profile-after-change", "PresentationDeviceManager", PRESENTATION_DEVICE_MANAGER_CONTRACTID },
   { "profile-after-change", "PresentationService", PRESENTATION_SERVICE_CONTRACTID },
-  { "idle-daily", "ServiceWorker Periodic Updater", SERVICEWORKERPERIODICUPDATER_CONTRACTID },
   { nullptr }
 };
 
diff --git a/layout/tools/reftest/b2g_desktop.py b/layout/tools/reftest/b2g_desktop.py
index 45c0cd6c6942..018a4d827e24 100644
--- a/layout/tools/reftest/b2g_desktop.py
+++ b/layout/tools/reftest/b2g_desktop.py
@@ -137,8 +137,6 @@ class B2GDesktopReftest(RefTest):
         # Set a future policy version to avoid the telemetry prompt.
         prefs["toolkit.telemetry.prompted"] = 999
         prefs["toolkit.telemetry.notifiedOptOut"] = 999
-        # Disable periodic updates of service workers
-        prefs["dom.serviceWorkers.periodic-updates.enabled"] = False
 
         # Set the extra prefs.
         profile.set_preferences(prefs)
diff --git a/layout/tools/reftest/reftest-preferences.js b/layout/tools/reftest/reftest-preferences.js
index 28b47fb5b420..66e31fd25e4f 100644
--- a/layout/tools/reftest/reftest-preferences.js
+++ b/layout/tools/reftest/reftest-preferences.js
@@ -65,8 +65,5 @@
     // Make sure SelfSupport doesn't hit the network.
     branch.setCharPref("browser.selfsupport.url", "https://%(server)s/selfsupport-dummy/");
 
-    // Disable periodic updates of service workers.
-    branch.setBoolPref("dom.serviceWorkers.periodic-updates.enabled", false);
-
     // Allow XUL and XBL files to be opened from file:// URIs
     branch.setBoolPref("dom.allow_XUL_XBL_for_file", true);
diff --git a/layout/tools/reftest/runreftestb2g.py b/layout/tools/reftest/runreftestb2g.py
index 78836d204258..6ec0069a8252 100644
--- a/layout/tools/reftest/runreftestb2g.py
+++ b/layout/tools/reftest/runreftestb2g.py
@@ -261,8 +261,6 @@ class B2GRemoteReftest(RefTest):
         # Disable tiles also
         prefs["browser.newtabpage.directory.source"] = ""
         prefs["browser.newtabpage.directory.ping"] = ""
-        # Disable periodic updates of service workers
-        prefs["dom.serviceWorkers.periodic-updates.enabled"] = False
 
         if options.oop:
             prefs['browser.tabs.remote.autostart'] = True
diff --git a/testing/mozbase/mozprofile/mozprofile/profile.py b/testing/mozbase/mozprofile/mozprofile/profile.py
index a29d47da7520..2dddebc5d318 100644
--- a/testing/mozbase/mozprofile/mozprofile/profile.py
+++ b/testing/mozbase/mozprofile/mozprofile/profile.py
@@ -388,8 +388,6 @@ class FirefoxProfile(Profile):
                    # Our current tests expect the unified Telemetry feature to be opt-out,
                    # which is not true while we hold back shipping it.
                    'toolkit.telemetry.unifiedIsOptIn': True,
-                   # Disable periodic updates of service workers
-                   'dom.serviceWorkers.periodic-updates.enabled': False,
                    }
 
 class MetroFirefoxProfile(Profile):
@@ -436,8 +434,6 @@ class MetroFirefoxProfile(Profile):
                    # Don't send Telemetry reports to the production server. This is
                    # needed as Telemetry sends pings also if FHR upload is enabled.
                    'toolkit.telemetry.server' : 'http://%(server)s/telemetry-dummy/',
-                   # Disable periodic updates of service workers
-                   'dom.serviceWorkers.periodic-updates.enabled': False,
                    }
 
 class ThunderbirdProfile(Profile):
diff --git a/testing/profiles/prefs_general.js b/testing/profiles/prefs_general.js
index addaa35d86be..b5778431bbde 100644
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -337,9 +337,6 @@ user_pref("network.proxy.pac_generator", false);
 // selected by default).
 user_pref("lightweightThemes.selectedThemeID", "");
 
-// Disable periodic updates of service workers.
-user_pref("dom.serviceWorkers.periodic-updates.enabled", false);
-
 // Enable speech synth test service, and disable built in platform services.
 user_pref("media.webspeech.synth.test", true);
 
diff --git a/testing/specialpowers/components/SpecialPowersObserver.js b/testing/specialpowers/components/SpecialPowersObserver.js
index 33b1e6eeb65c..37c2fcbbea51 100644
--- a/testing/specialpowers/components/SpecialPowersObserver.js
+++ b/testing/specialpowers/components/SpecialPowersObserver.js
@@ -88,7 +88,6 @@ SpecialPowersObserver.prototype = new SpecialPowersObserverAPI();
       this._messageManager.addMessageListener("SPChromeScriptMessage", this);
       this._messageManager.addMessageListener("SPQuotaManager", this);
       this._messageManager.addMessageListener("SPSetTestPluginEnabledState", this);
-      this._messageManager.addMessageListener("SPPeriodicServiceWorkerUpdates", this);
       this._messageManager.addMessageListener("SPLoadExtension", this);
       this._messageManager.addMessageListener("SPStartupExtension", this);
       this._messageManager.addMessageListener("SPUnloadExtension", this);
@@ -169,7 +168,6 @@ SpecialPowersObserver.prototype = new SpecialPowersObserverAPI();
       this._messageManager.removeMessageListener("SPChromeScriptMessage", this);
       this._messageManager.removeMessageListener("SPQuotaManager", this);
       this._messageManager.removeMessageListener("SPSetTestPluginEnabledState", this);
-      this._messageManager.removeMessageListener("SPPeriodicServiceWorkerUpdates", this);
       this._messageManager.removeMessageListener("SPLoadExtension", this);
       this._messageManager.removeMessageListener("SPStartupExtension", this);
       this._messageManager.removeMessageListener("SPUnloadExtension", this);
diff --git a/testing/specialpowers/content/SpecialPowersObserverAPI.js b/testing/specialpowers/content/SpecialPowersObserverAPI.js
index 80197ed413aa..f22b668bf1c4 100644
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -529,17 +529,6 @@ SpecialPowersObserverAPI.prototype = {
         return undefined;	// See comment at the beginning of this function.
       }
 
-      case "SPPeriodicServiceWorkerUpdates": {
-        // We could just dispatch a generic idle-daily notification here, but
-        // this is better since it avoids invoking other idle daily observers
-        // at the cost of hard-coding the usage of PeriodicServiceWorkerUpdater.
-        Cc["@mozilla.org/service-worker-periodic-updater;1"].
-          getService(Ci.nsIObserver).
-          observe(null, "idle-daily", "Caller:SpecialPowers");
-
-        return undefined;	// See comment at the beginning of this function.
-      }
-
       case "SPCleanUpSTSData": {
         let origin = aMessage.data.origin;
         let flags = aMessage.data.flags;
diff --git a/testing/specialpowers/content/specialpowers.js b/testing/specialpowers/content/specialpowers.js
index a676adbbcf70..9342916ae402 100644
--- a/testing/specialpowers/content/specialpowers.js
+++ b/testing/specialpowers/content/specialpowers.js
@@ -32,7 +32,6 @@ function SpecialPowers(window) {
                            "SPProcessCrashService",
                            "SPSetTestPluginEnabledState",
                            "SPWebAppService",
-                           "SPPeriodicServiceWorkerUpdates",
                            "SPCleanUpSTSData"];
 
   this.SP_ASYNC_MESSAGES = ["SpecialPowers.Focus",
diff --git a/testing/specialpowers/content/specialpowersAPI.js b/testing/specialpowers/content/specialpowersAPI.js
index f6926f4a2ccc..5347acc57bd8 100644
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -1999,10 +1999,6 @@ SpecialPowersAPI.prototype = {
     return new File(path, options);
   },
 
-  startPeriodicServiceWorkerUpdates: function() {
-    return this._sendSyncMessage('SPPeriodicServiceWorkerUpdates', {});
-  },
-
   removeAllServiceWorkerData: function() {
     this.notifyObserversInParentProcess(null, "browser:purge-session-history", "");
   },
diff --git a/testing/tps/tps/testrunner.py b/testing/tps/tps/testrunner.py
index 6c9e248de035..c41c73e432cf 100644
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -72,8 +72,6 @@ class TPSTestRunner(object):
         'services.sync.firstSync': 'notReady',
         'services.sync.lastversion': '1.0',
         'toolkit.startup.max_resumed_crashes': -1,
-        # Disable periodic updates of service workers
-        'dom.serviceWorkers.periodic-updates.enabled': False,
     }
 
     debug_preferences = {