diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 1e9b90b60019..2de612e52bb3 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -59,7 +59,6 @@ #endif #include "Principal.h" -#include "ServiceWorker.h" #include "SharedWorker.h" #include "WorkerPrivate.h" #include "WorkerRunnable.h" @@ -2249,61 +2248,6 @@ RuntimeService::ResumeWorkersForWindow(nsPIDOMWindow* aWindow) } } -nsresult -RuntimeService::CreateServiceWorker(const GlobalObject& aGlobal, - const nsAString& aScriptURL, - const nsACString& aScope, - ServiceWorker** aServiceWorker) -{ - nsresult rv; - - nsCOMPtr window = do_QueryInterface(aGlobal.GetAsSupports()); - MOZ_ASSERT(window); - - nsRefPtr sharedWorker; - rv = CreateSharedWorkerInternal(aGlobal, aScriptURL, aScope, - WorkerTypeService, - getter_AddRefs(sharedWorker)); - - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; - } - - nsRefPtr serviceWorker = - new ServiceWorker(window, sharedWorker); - - serviceWorker->mURL = aScriptURL; - - serviceWorker.forget(aServiceWorker); - return rv; -} - -nsresult -RuntimeService::CreateServiceWorkerFromLoadInfo(JSContext* aCx, - WorkerLoadInfo* aLoadInfo, - const nsAString& aScriptURL, - const nsACString& aScope, - ServiceWorker** aServiceWorker) -{ - - nsRefPtr sharedWorker; - nsresult rv = CreateSharedWorkerFromLoadInfo(aCx, aLoadInfo, aScriptURL, aScope, - WorkerTypeService, - getter_AddRefs(sharedWorker)); - - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; - } - - nsRefPtr serviceWorker = - new ServiceWorker(nullptr, sharedWorker); - - serviceWorker->mURL = aScriptURL; - - serviceWorker.forget(aServiceWorker); - return rv; -} - nsresult RuntimeService::CreateSharedWorkerInternal(const GlobalObject& aGlobal, const nsAString& aScriptURL, diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h index b963a11f5b43..e1a0c403d732 100644 --- a/dom/workers/RuntimeService.h +++ b/dom/workers/RuntimeService.h @@ -22,7 +22,6 @@ class nsPIDOMWindow; BEGIN_WORKERS_NAMESPACE -class ServiceWorker; class SharedWorker; class WorkerThread; @@ -146,17 +145,25 @@ public: } nsresult - CreateServiceWorker(const GlobalObject& aGlobal, - const nsAString& aScriptURL, - const nsACString& aScope, - ServiceWorker** aServiceWorker); + CreateSharedWorkerForServiceWorker(const GlobalObject& aGlobal, + const nsAString& aScriptURL, + const nsACString& aScope, + SharedWorker** aSharedWorker) + { + return CreateSharedWorkerInternal(aGlobal, aScriptURL, aScope, + WorkerTypeService, aSharedWorker); + } nsresult - CreateServiceWorkerFromLoadInfo(JSContext* aCx, - WorkerLoadInfo* aLoadInfo, - const nsAString& aScriptURL, - const nsACString& aScope, - ServiceWorker** aServiceWorker); + CreateSharedWorkerForServiceWorkerFromLoadInfo(JSContext* aCx, + WorkerLoadInfo* aLoadInfo, + const nsAString& aScriptURL, + const nsACString& aScope, + SharedWorker** aSharedWorker) + { + return CreateSharedWorkerFromLoadInfo(aCx, aLoadInfo, aScriptURL, aScope, + WorkerTypeService, aSharedWorker); + } void ForgetSharedWorker(WorkerPrivate* aWorkerPrivate); diff --git a/dom/workers/ServiceWorker.cpp b/dom/workers/ServiceWorker.cpp index 68c63d5ae0eb..db1756979855 100644 --- a/dom/workers/ServiceWorker.cpp +++ b/dom/workers/ServiceWorker.cpp @@ -6,6 +6,7 @@ #include "ServiceWorker.h" #include "nsPIDOMWindow.h" +#include "ServiceWorkerManager.h" #include "SharedWorker.h" #include "WorkerPrivate.h" @@ -38,18 +39,24 @@ ServiceWorkerVisible(JSContext* aCx, JSObject* aObj) } ServiceWorker::ServiceWorker(nsPIDOMWindow* aWindow, + ServiceWorkerInfo* aInfo, SharedWorker* aSharedWorker) : DOMEventTargetHelper(aWindow), - mState(ServiceWorkerState::Installing), + mInfo(aInfo), mSharedWorker(aSharedWorker) { AssertIsOnMainThread(); + MOZ_ASSERT(aInfo); MOZ_ASSERT(mSharedWorker); + + // This will update our state too. + mInfo->AppendWorker(this); } ServiceWorker::~ServiceWorker() { AssertIsOnMainThread(); + mInfo->RemoveWorker(this); } NS_IMPL_ADDREF_INHERITED(ServiceWorker, DOMEventTargetHelper) @@ -69,6 +76,12 @@ ServiceWorker::WrapObject(JSContext* aCx) return ServiceWorkerBinding::Wrap(aCx, this); } +void +ServiceWorker::GetScriptURL(nsString& aURL) const +{ + CopyUTF8toUTF16(mInfo->ScriptSpec(), aURL); +} + void ServiceWorker::PostMessage(JSContext* aCx, JS::Handle aMessage, const Optional>& aTransferable, @@ -95,6 +108,16 @@ ServiceWorker::GetWorkerPrivate() const return mSharedWorker->GetWorkerPrivate(); } +void +ServiceWorker::QueueStateChangeEvent(ServiceWorkerState aState) +{ + nsCOMPtr r = + NS_NewRunnableMethodWithArg(this, + &ServiceWorker::DispatchStateChange, + aState); + MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToMainThread(r))); +} + } // namespace workers } // namespace dom } // namespace mozilla diff --git a/dom/workers/ServiceWorker.h b/dom/workers/ServiceWorker.h index 628750186c70..ef33e8cc7588 100644 --- a/dom/workers/ServiceWorker.h +++ b/dom/workers/ServiceWorker.h @@ -19,6 +19,8 @@ class Promise; namespace workers { +class ServiceWorkerInfo; +class ServiceWorkerManager; class SharedWorker; bool @@ -26,7 +28,7 @@ ServiceWorkerVisible(JSContext* aCx, JSObject* aObj); class ServiceWorker MOZ_FINAL : public DOMEventTargetHelper { - friend class RuntimeService; + friend class ServiceWorkerManager; public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorker, DOMEventTargetHelper) @@ -50,16 +52,17 @@ public: } void - GetScriptURL(nsString& aURL) const + GetScriptURL(nsString& aURL) const; + + void + DispatchStateChange(ServiceWorkerState aState) { - aURL = mURL; + SetState(aState); + DOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("statechange")); } void - DispatchStateChange() - { - DOMEventTargetHelper::DispatchTrustedEvent(NS_LITERAL_STRING("statechange")); - } + QueueStateChangeEvent(ServiceWorkerState aState); #ifdef XP_WIN #undef PostMessage @@ -74,14 +77,15 @@ public: GetWorkerPrivate() const; private: - // This class can only be created from the RuntimeService. - ServiceWorker(nsPIDOMWindow* aWindow, SharedWorker* aSharedWorker); + // This class can only be created from the ServiceWorkerManager. + ServiceWorker(nsPIDOMWindow* aWindow, ServiceWorkerInfo* aInfo, + SharedWorker* aSharedWorker); // This class is reference-counted and will be destroyed from Release(). ~ServiceWorker(); ServiceWorkerState mState; - nsString mURL; + const nsRefPtr mInfo; // To allow ServiceWorkers to potentially drop the backing DOMEventTargetHelper and // re-instantiate it later, they simply own a SharedWorker member that diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 8b9bfded403f..fb08490d32f2 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -567,10 +567,11 @@ public: // errors. Ideally we should just pass this worker on to ContinueInstall. MOZ_ASSERT(!swm->mSetOfScopesBeingUpdated.Contains(mRegistration->mScope)); swm->mSetOfScopesBeingUpdated.Put(mRegistration->mScope, true); + nsRefPtr dummyInfo = + new ServiceWorkerInfo(mRegistration, mRegistration->mScriptSpec); nsRefPtr serviceWorker; rv = swm->CreateServiceWorker(mRegistration->mPrincipal, - mRegistration->mScriptSpec, - mRegistration->mScope, + dummyInfo, getter_AddRefs(serviceWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { @@ -639,8 +640,7 @@ public: nsRefPtr serviceWorker; nsresult rv = swm->CreateServiceWorker(mRegistration->mPrincipal, - mRegistration->mInstallingWorker->ScriptSpec(), - mRegistration->mScope, + mRegistration->mInstallingWorker, getter_AddRefs(serviceWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { @@ -784,13 +784,8 @@ private: mRegistration->mWaitingWorker->UpdateState(ServiceWorkerState::Redundant); } - // Although the spec first sets waiting worker and then updates its state, - // our ServiceWorkerInfo does not hold a list of associated ServiceWorker - // objects in content JS. This means if we want to fire an event on - // ServiceWorkerRegistration.installing, we need to do it first, before - // swapping it with waiting worker. - mRegistration->mInstallingWorker->UpdateState(ServiceWorkerState::Installed); mRegistration->mWaitingWorker = mRegistration->mInstallingWorker.forget(); + mRegistration->mWaitingWorker->UpdateState(ServiceWorkerState::Installed); swm->InvalidateServiceWorkerRegistrationWorker(mRegistration, WhichServiceWorker::INSTALLING_WORKER | WhichServiceWorker::WAITING_WORKER); @@ -1150,8 +1145,7 @@ ServiceWorkerRegistrationInfo::Activate() nsRefPtr serviceWorker; nsresult rv = swm->CreateServiceWorker(mPrincipal, - mActiveWorker->ScriptSpec(), - mScope, + mActiveWorker, getter_AddRefs(serviceWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { nsCOMPtr r = @@ -1708,54 +1702,16 @@ ServiceWorkerRegistrationInfo::FinishActivate(bool aSuccess) } } -void -ServiceWorkerRegistrationInfo::QueueStateChangeEvent(ServiceWorkerInfo* aInfo, - ServiceWorkerState aState) const -{ - AssertIsOnMainThread(); - MOZ_ASSERT(aInfo); - MOZ_ASSERT(aInfo == mInstallingWorker || - aInfo == mWaitingWorker || - aInfo == mActiveWorker); - - nsRefPtr swm = ServiceWorkerManager::GetInstance(); - WhichServiceWorker whichOne; - if (aInfo == mInstallingWorker) { - whichOne = WhichServiceWorker::INSTALLING_WORKER; - } else if (aInfo == mWaitingWorker) { - whichOne = WhichServiceWorker::WAITING_WORKER; - } else if (aInfo == mActiveWorker) { - whichOne = WhichServiceWorker::ACTIVE_WORKER; - } else { - MOZ_CRASH("Hit unexpected case"); - } - - // Refactor this iteration pattern across this and 2 other call-sites. - nsTObserverArray::ForwardIterator it(swm->mServiceWorkerRegistrations); - while (it.HasMore()) { - nsRefPtr target = it.GetNext(); - nsAutoString regScope; - target->GetScope(regScope); - MOZ_ASSERT(!regScope.IsEmpty()); - - NS_ConvertUTF16toUTF8 utf8Scope(regScope); - if (utf8Scope.Equals(mScope)) { - target->QueueStateChangeEvent(whichOne, aState); - } - } -} - NS_IMETHODIMP ServiceWorkerManager::CreateServiceWorkerForWindow(nsPIDOMWindow* aWindow, - const nsACString& aScriptSpec, - const nsACString& aScope, + ServiceWorkerInfo* aInfo, ServiceWorker** aServiceWorker) { AssertIsOnMainThread(); MOZ_ASSERT(aWindow); RuntimeService* rs = RuntimeService::GetOrCreateService(); - nsRefPtr serviceWorker; + nsRefPtr sharedWorker; AutoJSAPI jsapi; jsapi.Init(aWindow); @@ -1764,15 +1720,18 @@ ServiceWorkerManager::CreateServiceWorkerForWindow(nsPIDOMWindow* aWindow, nsCOMPtr sgo = do_QueryInterface(aWindow); JS::Rooted jsGlobal(cx, sgo->GetGlobalJSObject()); GlobalObject global(cx, jsGlobal); - nsresult rv = rs->CreateServiceWorker(global, - NS_ConvertUTF8toUTF16(aScriptSpec), - aScope, - getter_AddRefs(serviceWorker)); + nsresult rv = rs->CreateSharedWorkerForServiceWorker(global, + NS_ConvertUTF8toUTF16(aInfo->ScriptSpec()), + aInfo->Scope(), + getter_AddRefs(sharedWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } + nsRefPtr serviceWorker = + new ServiceWorker(aWindow, aInfo, sharedWorker); + serviceWorker.forget(aServiceWorker); return rv; } @@ -2073,7 +2032,7 @@ ServiceWorkerManager::GetServiceWorkerForScope(nsIDOMWindow* aWindow, AssertIsOnMainThread(); nsCOMPtr window = do_QueryInterface(aWindow); - if (!window) { + if (NS_WARN_IF(!window)) { return NS_ERROR_FAILURE; } @@ -2100,7 +2059,7 @@ ServiceWorkerManager::GetServiceWorkerForScope(nsIDOMWindow* aWindow, //////////////////////////////////////////// nsRefPtr registration = GetRegistration(scope); - if (!registration) { + if (NS_WARN_IF(!registration)) { return NS_ERROR_FAILURE; } @@ -2115,14 +2074,13 @@ ServiceWorkerManager::GetServiceWorkerForScope(nsIDOMWindow* aWindow, MOZ_CRASH("Invalid worker type"); } - if (!info) { + if (NS_WARN_IF(!info)) { return NS_ERROR_DOM_NOT_FOUND_ERR; } nsRefPtr serviceWorker; rv = CreateServiceWorkerForWindow(window, - info->ScriptSpec(), - registration->mScope, + info, getter_AddRefs(serviceWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -2321,8 +2279,7 @@ ServiceWorkerManager::DispatchFetchEvent(nsIDocument* aDoc, nsIInterceptedChanne nsRefPtr sw; rv = CreateServiceWorker(registration->mPrincipal, - registration->mActiveWorker->ScriptSpec(), - registration->mScope, + registration->mActiveWorker, getter_AddRefs(sw)); serviceWorker = sw.forget(); } @@ -2418,8 +2375,7 @@ ServiceWorkerManager::GetDocumentController(nsIDOMWindow* aWindow, nsISupports** nsRefPtr serviceWorker; rv = CreateServiceWorkerForWindow(window, - registration->mActiveWorker->ScriptSpec(), - registration->mScope, + registration->mActiveWorker, getter_AddRefs(serviceWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -2461,15 +2417,15 @@ ServiceWorkerManager::GetActive(nsIDOMWindow* aWindow, NS_IMETHODIMP ServiceWorkerManager::CreateServiceWorker(nsIPrincipal* aPrincipal, - const nsACString& aScriptSpec, - const nsACString& aScope, + ServiceWorkerInfo* aInfo, ServiceWorker** aServiceWorker) { AssertIsOnMainThread(); MOZ_ASSERT(aPrincipal); WorkerLoadInfo info; - nsresult rv = NS_NewURI(getter_AddRefs(info.mBaseURI), aScriptSpec, nullptr, nullptr); + nsresult rv = NS_NewURI(getter_AddRefs(info.mBaseURI), aInfo->ScriptSpec(), + nullptr, nullptr); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -2491,7 +2447,6 @@ ServiceWorkerManager::CreateServiceWorker(nsIPrincipal* aPrincipal, // them here. WorkerPrivate::OverrideLoadInfoLoadGroup(info); - nsRefPtr serviceWorker; RuntimeService* rs = RuntimeService::GetOrCreateService(); if (!rs) { return NS_ERROR_FAILURE; @@ -2499,15 +2454,19 @@ ServiceWorkerManager::CreateServiceWorker(nsIPrincipal* aPrincipal, AutoJSAPI jsapi; jsapi.Init(); - rv = rs->CreateServiceWorkerFromLoadInfo(jsapi.cx(), &info, - NS_ConvertUTF8toUTF16(aScriptSpec), - aScope, - getter_AddRefs(serviceWorker)); + nsRefPtr sharedWorker; + rv = rs->CreateSharedWorkerForServiceWorkerFromLoadInfo(jsapi.cx(), &info, + NS_ConvertUTF8toUTF16(aInfo->ScriptSpec()), + aInfo->Scope(), + getter_AddRefs(sharedWorker)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } + nsRefPtr serviceWorker = + new ServiceWorker(nullptr, aInfo, sharedWorker); + serviceWorker.forget(aServiceWorker); return NS_OK; } @@ -2721,4 +2680,54 @@ ServiceWorkerManager::RemoveRegistration(ServiceWorkerRegistrationInfo* aRegistr } mActor->SendUnregisterServiceWorker(principalInfo, NS_ConvertUTF8toUTF16(reg->mScope)); } + +void +ServiceWorkerInfo::AppendWorker(ServiceWorker* aWorker) +{ + MOZ_ASSERT(aWorker); +#ifdef DEBUG + nsAutoString workerURL; + aWorker->GetScriptURL(workerURL); + MOZ_ASSERT(workerURL.Equals(NS_ConvertUTF8toUTF16(mScriptSpec))); +#endif + MOZ_ASSERT(!mInstances.Contains(aWorker)); + + mInstances.AppendElement(aWorker); + aWorker->SetState(State()); +} + +void +ServiceWorkerInfo::RemoveWorker(ServiceWorker* aWorker) +{ + MOZ_ASSERT(aWorker); +#ifdef DEBUG + nsAutoString workerURL; + aWorker->GetScriptURL(workerURL); + MOZ_ASSERT(workerURL.Equals(NS_ConvertUTF8toUTF16(mScriptSpec))); +#endif + MOZ_ASSERT(mInstances.Contains(aWorker)); + + mInstances.RemoveElement(aWorker); +} + +void +ServiceWorkerInfo::UpdateState(ServiceWorkerState aState) +{ +#ifdef DEBUG + // Any state can directly transition to redundant, but everything else is + // ordered. + if (aState != ServiceWorkerState::Redundant) { + MOZ_ASSERT_IF(mState == ServiceWorkerState::EndGuard_, aState == ServiceWorkerState::Installing); + MOZ_ASSERT_IF(mState == ServiceWorkerState::Installing, aState == ServiceWorkerState::Installed); + MOZ_ASSERT_IF(mState == ServiceWorkerState::Installed, aState == ServiceWorkerState::Activating); + MOZ_ASSERT_IF(mState == ServiceWorkerState::Activating, aState == ServiceWorkerState::Activated); + } + // Activated can only go to redundant. + MOZ_ASSERT_IF(mState == ServiceWorkerState::Activated, aState == ServiceWorkerState::Redundant); +#endif + mState = aState; + for (uint32_t i = 0; i < mInstances.Length(); ++i) { + mInstances[i]->QueueStateChangeEvent(mState); + } +} END_WORKERS_NAMESPACE diff --git a/dom/workers/ServiceWorkerManager.h b/dom/workers/ServiceWorkerManager.h index e492da67cbd7..0ee4f3bc5239 100644 --- a/dom/workers/ServiceWorkerManager.h +++ b/dom/workers/ServiceWorkerManager.h @@ -201,9 +201,6 @@ public: void FinishActivate(bool aSuccess); - void - QueueStateChangeEvent(ServiceWorkerInfo* aInfo, - ServiceWorkerState aState) const; }; /* @@ -218,6 +215,11 @@ private: const ServiceWorkerRegistrationInfo* mRegistration; nsCString mScriptSpec; ServiceWorkerState mState; + // We hold rawptrs since the ServiceWorker constructor and destructor ensure + // addition and removal. + // There is a high chance of there being at least one ServiceWorker + // associated with this all the time. + nsAutoTArray mInstances; ~ServiceWorkerInfo() { } @@ -231,6 +233,12 @@ public: return mScriptSpec; } + const nsCString& + Scope() const + { + return mRegistration->mScope; + } + void SetScriptSpec(const nsCString& aSpec) { MOZ_ASSERT(!aSpec.IsEmpty()); @@ -253,23 +261,7 @@ public: } void - UpdateState(ServiceWorkerState aState) - { -#ifdef DEBUG - // Any state can directly transition to redundant, but everything else is - // ordered. - if (aState != ServiceWorkerState::Redundant) { - MOZ_ASSERT_IF(mState == ServiceWorkerState::EndGuard_, aState == ServiceWorkerState::Installing); - MOZ_ASSERT_IF(mState == ServiceWorkerState::Installing, aState == ServiceWorkerState::Installed); - MOZ_ASSERT_IF(mState == ServiceWorkerState::Installed, aState == ServiceWorkerState::Activating); - MOZ_ASSERT_IF(mState == ServiceWorkerState::Activating, aState == ServiceWorkerState::Activated); - } - // Activated can only go to redundant. - MOZ_ASSERT_IF(mState == ServiceWorkerState::Activated, aState == ServiceWorkerState::Redundant); -#endif - mState = aState; - mRegistration->QueueStateChangeEvent(this, mState); - } + UpdateState(ServiceWorkerState aState); // Only used to set initial state when loading from disk! void @@ -277,6 +269,12 @@ public: { mState = aState; } + + void + AppendWorker(ServiceWorker* aWorker); + + void + RemoveWorker(ServiceWorker* aWorker); }; #define NS_SERVICEWORKERMANAGER_IMPL_IID \ @@ -404,14 +402,12 @@ private: NS_IMETHOD CreateServiceWorkerForWindow(nsPIDOMWindow* aWindow, - const nsACString& aScriptSpec, - const nsACString& aScope, + ServiceWorkerInfo* aInfo, ServiceWorker** aServiceWorker); NS_IMETHOD CreateServiceWorker(nsIPrincipal* aPrincipal, - const nsACString& aScriptSpec, - const nsACString& aScope, + ServiceWorkerInfo* aInfo, ServiceWorker** aServiceWorker); NS_IMETHODIMP diff --git a/dom/workers/ServiceWorkerRegistration.cpp b/dom/workers/ServiceWorkerRegistration.cpp index 9b2dbe54c4e6..ccec9571da43 100644 --- a/dom/workers/ServiceWorkerRegistration.cpp +++ b/dom/workers/ServiceWorkerRegistration.cpp @@ -265,28 +265,6 @@ ServiceWorkerRegistration::InvalidateWorkerReference(WhichServiceWorker aWhichOn } } -void -ServiceWorkerRegistration::QueueStateChangeEvent(WhichServiceWorker aWhichOne, - ServiceWorkerState aState) const -{ - nsRefPtr worker; - if (aWhichOne == WhichServiceWorker::INSTALLING_WORKER) { - worker = mInstallingWorker; - } else if (aWhichOne == WhichServiceWorker::WAITING_WORKER) { - worker = mWaitingWorker; - } else if (aWhichOne == WhichServiceWorker::ACTIVE_WORKER) { - worker = mActiveWorker; - } else { - MOZ_CRASH("Invalid case"); - } - - if (worker) { - worker->SetState(aState); - nsCOMPtr r = NS_NewRunnableMethod(worker, &ServiceWorker::DispatchStateChange); - NS_DispatchToMainThread(r); - } -} - // XXXnsm, maybe this can be optimized to only add when a event handler is // registered. void diff --git a/dom/workers/ServiceWorkerRegistration.h b/dom/workers/ServiceWorkerRegistration.h index 1fcd2d619dcb..e3b15fd61089 100644 --- a/dom/workers/ServiceWorkerRegistration.h +++ b/dom/workers/ServiceWorkerRegistration.h @@ -59,9 +59,6 @@ public: void InvalidateWorkerReference(WhichServiceWorker aWhichOnes); - void - QueueStateChangeEvent(WhichServiceWorker aWhichOne, ServiceWorkerState aState) const; - // DOMEventTargethelper virtual void DisconnectFromOwner() MOZ_OVERRIDE;