FINISHED
authorNikhil Marathe <nsm.nikhil@gmail.com>
Fri, 11 Jul 2014 13:44:15 -0700
changeset 1099 9ccc8ddf1d762296e842c0f1b3599f92a4c76d77
parent 1098 83220639136f0150f45e4223a41414d6c7825f06
child 1100 9024986f644e8f58a51839019775f2fc2f0af1ac
push id32
push usernsm.nikhil@gmail.com
push dateThu, 24 Jul 2014 00:32:46 +0000
FINISHED qparent: 98da4fad036f qtip: 98da4fad036f top: (none)
983497-swc-events+
983497-swc-events-infra+
series
deleted file mode 100644
--- a/983497-swc-events+
+++ /dev/null
@@ -1,231 +0,0 @@
-# HG changeset patch
-# Parent dcc29342b977b541c03fdf5c266f9c04e75dafed
-# User Nikhil Marathe <nsm.nikhil@gmail.com>
-Bug 983497 - Patch 2: Fire events on ServiceWorkerContainers. r=ehsan
-
-diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp
---- a/dom/workers/ServiceWorkerManager.cpp
-+++ b/dom/workers/ServiceWorkerManager.cpp
-@@ -684,30 +684,30 @@ ServiceWorkerManager::HandleError(JSCont
- 
-   ErrorEventInit init;
-   init.mMessage = aMessage;
-   init.mFilename = aFilename;
-   init.mLineno = aLineNumber;
-   init.mColno = aColumnNumber;
- 
-   // If the worker was the one undergoing registration, we reject the promises,
--  // otherwise we fire events on the ServiceWorker instances.
-+  // otherwise we fire events on the ServiceWorkerContainer instances.
- 
-   // If there is an update in progress and the worker that errored is the same one
-   // that is being updated, it is a sufficient test for 'this worker is being
-   // registered'.
-   // FIXME(nsm): Except the case where an update is found for a worker, in
-   // which case we'll need some other association than simply the URL.
-   if (registration->mUpdateInstance &&
-       registration->mUpdateInstance->GetScriptSpec().Equals(NS_ConvertUTF16toUTF8(aWorkerURL))) {
-     RejectUpdatePromiseObservers(registration, init);
-     // We don't need to abort here since the worker has already run.
-     registration->mUpdateInstance = nullptr;
-   } else {
--    // FIXME(nsm): Bug 983497 Fire 'error' on ServiceWorkerContainers.
-+    FireEventOnServiceWorkerContainers(registration, init);
-   }
- }
- 
- class FinishInstallRunnable MOZ_FINAL : public nsRunnable
- {
-   nsMainThreadPtrHandle<ServiceWorkerRegistration> mRegistration;
- 
- public:
-@@ -1021,17 +1021,18 @@ ServiceWorkerManager::Install(ServiceWor
-   // the event dispatch. On the other hand, networking, IDB and so on do keep
-   // the worker alive, so the waitUntil() is only relevant if the Promise is
-   // gated on those actions. I (nsm) am not sure if it is worth requiring
-   // a special spec mention saying the install event should keep the worker
-   // alive indefinitely purely on the basis of calling waitUntil(), since
-   // a wait is likely to be required only when performing networking or storage
-   // transactions in the first place.
- 
--  // FIXME(nsm): Bug 983497. Fire "updatefound" on ServiceWorkerContainers.
-+  FireEventOnServiceWorkerContainers(aRegistration,
-+                                     NS_LITERAL_STRING("updatefound"));
- }
- 
- class ActivationRunnable : public nsRunnable
- {
-   nsRefPtr<ServiceWorkerRegistration> mRegistration;
- public:
-   explicit ActivationRunnable(ServiceWorkerRegistration* aRegistration)
-     : mRegistration(aRegistration)
-@@ -1042,22 +1043,25 @@ public:
-   Run() MOZ_OVERRIDE
-   {
-     if (mRegistration->mCurrentWorker) {
-       // FIXME(nsm). Steps 3.1-3.4 of the algorithm.
-     }
- 
-     mRegistration->mCurrentWorker = mRegistration->mWaitingWorker.forget();
- 
--    // FIXME(nsm): Steps 6-8 of the algorithm.
-+    // FIXME(nsm): Steps 6-7 of the algorithm.
-+
-+    nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
-+
-+    swm->FireEventOnServiceWorkerContainers(mRegistration,
-+                                            NS_LITERAL_STRING("controllerchange"));
- 
-     nsRefPtr<ServiceWorker> serviceWorker;
- 
--    nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
--
-     nsresult rv =
-       swm->CreateServiceWorker(mRegistration->mCurrentWorker->GetScriptSpec(),
-                                mRegistration->mScope,
-                                getter_AddRefs(serviceWorker));
-     if (NS_WARN_IF(NS_FAILED(rv))) {
-       return rv;
-     }
- 
-@@ -1436,16 +1440,51 @@ ServiceWorkerManager::FireEventOnService
-       nsRefPtr<Event> event = new Event(target, nullptr, nullptr);
-       event->InitEvent(aName, false, true);
-       event->SetTrusted(true);
-       target->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
-     }
-   }
- }
- 
-+void
-+ServiceWorkerManager::FireEventOnServiceWorkerContainers(ServiceWorkerRegistration* aRegistration,
-+                                                         const ErrorEventInit& aInit)
-+{
-+  ServiceWorkerDomainInfo* domainInfo =
-+    GetDomainInfo(aRegistration->mScriptSpec);
-+
-+  if (domainInfo) {
-+    for (uint32_t i = 0; i < domainInfo->mServiceWorkerContainers.Length(); ++i) {
-+      ServiceWorkerContainer* target =
-+        domainInfo->mServiceWorkerContainers[i];
-+
-+      nsIURI* targetURI = target->GetDocumentURI();
-+      nsCString path;
-+      nsresult rv = targetURI->GetSpec(path);
-+      if (NS_WARN_IF(NS_FAILED(rv))) {
-+        continue;
-+      }
-+
-+      nsCString scope = FindScopeForPath(domainInfo->mOrderedScopes, path);
-+      if (scope.IsEmpty() ||
-+          !scope.Equals(aRegistration->mScope)) {
-+        continue;
-+      }
-+
-+      MOZ_ASSERT(target);
-+
-+      nsRefPtr<ErrorEvent> event =
-+        ErrorEvent::Constructor(target, NS_LITERAL_STRING("error"), aInit);
-+      event->SetTrusted(true);
-+      target->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
-+    }
-+  }
-+}
-+
- NS_IMETHODIMP
- ServiceWorkerManager::CreateServiceWorker(const nsACString& aScriptSpec,
-                                           const nsACString& aScope,
-                                           ServiceWorker** aServiceWorker)
- {
-   AssertIsOnMainThread();
- 
-   WorkerPrivate::LoadInfo info;
-diff --git a/dom/workers/ServiceWorkerManager.h b/dom/workers/ServiceWorkerManager.h
---- a/dom/workers/ServiceWorkerManager.h
-+++ b/dom/workers/ServiceWorkerManager.h
-@@ -351,16 +351,19 @@ private:
- 
-   static void
-   RemoveScope(nsTArray<nsCString>& aList, const nsACString& aScope);
- 
-   void
-   FireEventOnServiceWorkerContainers(ServiceWorkerRegistration* aRegistration,
-                                      const nsAString& aName);
- 
-+  void
-+  FireEventOnServiceWorkerContainers(ServiceWorkerRegistration* aRegistration,
-+                                     const ErrorEventInit& aInit);
- };
- 
- NS_DEFINE_STATIC_IID_ACCESSOR(ServiceWorkerManager,
-                               NS_SERVICEWORKERMANAGER_IMPL_IID);
- 
- } // namespace workers
- } // namespace dom
- } // namespace mozilla
-diff --git a/dom/workers/test/serviceworkers/test_installation_simple.html b/dom/workers/test/serviceworkers/test_installation_simple.html
---- a/dom/workers/test/serviceworkers/test_installation_simple.html
-+++ b/dom/workers/test/serviceworkers/test_installation_simple.html
-@@ -51,21 +51,21 @@
-     }, function(e) {
-       ok(e.name === "SecurityError", "Should fail with a SecurityError");
-     }).then(function() {
-       return new Promise((resolve) => SpecialPowers.popPrefEnv(resolve));
-     });
-   }
- 
-   function realWorker() {
--    var p = navigator.serviceWorker.register("worker.js");
-+    var p = navigator.serviceWorker.register("worker.js", { scope: "realworker*" });
-     return p.then(function(w) {
-       ok(w instanceof ServiceWorker, "Register a ServiceWorker");
-       info(w.scope);
--      ok(w.scope == (new URL("/*", document.baseURI)).href, "Scope should match");
-+      ok(w.scope == (new URL("realworker*", document.baseURI)).href, "Scope should match");
-       ok(w.url == (new URL("worker.js", document.baseURI)).href, "URL should be of the worker");
-     }, function(e) {
-       info("Error: " + e.name);
-       ok(false, "realWorker Registration should have succeeded!");
-     });
-   }
- 
-   function abortPrevious() {
-@@ -102,25 +102,38 @@
-     }, function(e) {
-     info("NSM " + e.name);
-       ok(e instanceof Error, "Registration should fail with parse error");
-     });
-   }
- 
-   // FIXME(nsm): test for parse error when Update step doesn't happen (directly from register).
- 
-+  function updatefound() {
-+    var p = navigator.serviceWorker.register("worker.js");
-+
-+    return new Promise(function(resolve, reject) {
-+      navigator.serviceWorker.onupdatefound = function(e) {
-+        ok(true, "Got updatefound event");
-+        navigator.serviceWorker.onupdatefound = null;
-+        resolve();
-+      }
-+    });
-+  }
-+
-   function runTest() {
-     simpleRegister()
-       .then(sameOriginWorker)
-       .then(sameOriginScope)
-       .then(httpsOnly)
-       .then(realWorker)
-       .then(abortPrevious)
-       .then(networkError404)
-       .then(parseError)
-+      .then(updatefound)
-       // put more tests here.
-       .then(function() {
-         SimpleTest.finish();
-       }).catch(function(e) {
-         ok(false, "Some test failed with error " + e);
-         SimpleTest.finish();
-       });
-   }
deleted file mode 100644
--- a/983497-swc-events-infra+
+++ /dev/null
@@ -1,380 +0,0 @@
-# HG changeset patch
-# Parent 18d78fcc7e2875b26ef76b047e0511851f5341be
-# User Nikhil Marathe <nsm.nikhil@gmail.com>
-Bug 983497 - Patch 1: Infrastructure to fire events on ServiceWorkerContainers. r=ehsan
-
-diff --git a/dom/interfaces/base/nsIServiceWorkerManager.idl b/dom/interfaces/base/nsIServiceWorkerManager.idl
---- a/dom/interfaces/base/nsIServiceWorkerManager.idl
-+++ b/dom/interfaces/base/nsIServiceWorkerManager.idl
-@@ -1,29 +1,34 @@
- /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- /* 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 "domstubs.idl"
- 
- interface nsIDocument;
-+interface nsIURI;
- 
--[uuid(3f4275e2-3a92-4acf-9ed5-57dc4cf43eb3)]
-+[uuid(6117cdf1-cb10-42a3-9901-4f1bab7ffa4d)]
- interface nsIServiceWorkerManager : nsISupports
- {
-   // Returns a Promise
-   nsISupports register(in nsIDOMWindow aWindow, in DOMString aScope, in DOMString aScriptURI);
- 
-   // Returns a Promise
-   nsISupports unregister(in nsIDOMWindow aWindow, in DOMString aScope);
- 
-   [noscript] void MaybeStartControlling(in nsIDocument aDoc);
- 
-   [noscript] void MaybeStopControlling(in nsIDocument aDoc);
- 
-+  // aTarget MUST be a ServiceWorkerContainer.
-+  [noscript] void AddContainerEventListener(in nsIURI aPageURI, in nsIDOMEventTarget aTarget);
-+  [noscript] void RemoveContainerEventListener(in nsIURI aPageURI, in nsIDOMEventTarget aTarget);
-+
-   // Testing
-   DOMString getScopeForUrl(in DOMString path);
- };
- 
- %{ C++
- #define SERVICEWORKERMANAGER_CONTRACTID "@mozilla.org/serviceworkers/manager;1"
- %}
-diff --git a/dom/workers/ServiceWorkerContainer.cpp b/dom/workers/ServiceWorkerContainer.cpp
---- a/dom/workers/ServiceWorkerContainer.cpp
-+++ b/dom/workers/ServiceWorkerContainer.cpp
-@@ -122,16 +122,36 @@ already_AddRefed<Promise>
- ServiceWorkerContainer::Ready()
- {
-   // FIXME(nsm): Bug 1025077
-   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow);
-   nsRefPtr<Promise> promise = new Promise(global);
-   return promise.forget();
- }
- 
-+// XXXnsm, maybe this can be optimized to only add when a event handler is
-+// registered.
-+void
-+ServiceWorkerContainer::StartListeningForEvents()
-+{
-+  nsCOMPtr<nsIServiceWorkerManager> swm = do_GetService(SERVICEWORKERMANAGER_CONTRACTID);
-+  if (swm) {
-+    swm->AddContainerEventListener(mWindow->GetDocumentURI(), this);
-+  }
-+}
-+
-+void
-+ServiceWorkerContainer::StopListeningForEvents()
-+{
-+  nsCOMPtr<nsIServiceWorkerManager> swm = do_GetService(SERVICEWORKERMANAGER_CONTRACTID);
-+  if (swm) {
-+    swm->RemoveContainerEventListener(mWindow->GetDocumentURI(), this);
-+  }
-+}
-+
- // Testing only.
- already_AddRefed<Promise>
- ServiceWorkerContainer::ClearAllServiceWorkerData(ErrorResult& aRv)
- {
-   aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
-   return nullptr;
- }
- 
-diff --git a/dom/workers/ServiceWorkerContainer.h b/dom/workers/ServiceWorkerContainer.h
---- a/dom/workers/ServiceWorkerContainer.h
-+++ b/dom/workers/ServiceWorkerContainer.h
-@@ -31,18 +31,18 @@ public:
-   IMPL_EVENT_HANDLER(updatefound)
-   IMPL_EVENT_HANDLER(controllerchange)
-   IMPL_EVENT_HANDLER(reloadpage)
-   IMPL_EVENT_HANDLER(error)
- 
-   explicit ServiceWorkerContainer(nsPIDOMWindow* aWindow)
-     : mWindow(aWindow)
-   {
--    // FIXME(nsm): Bug 983497. Here the NSW should hook into SWM to be notified of events.
-     SetIsDOMBinding();
-+    StartListeningForEvents();
-   }
- 
-   nsPIDOMWindow*
-   GetParentObject() const
-   {
-     return mWindow;
-   }
- 
-@@ -70,35 +70,47 @@ public:
-   GetController();
- 
-   already_AddRefed<Promise>
-   GetAll(ErrorResult& aRv);
- 
-   already_AddRefed<Promise>
-   Ready();
- 
-+  nsIURI*
-+  GetDocumentURI() const
-+  {
-+    return mWindow->GetDocumentURI();
-+  }
-+
-   // Testing only.
-   already_AddRefed<Promise>
-   ClearAllServiceWorkerData(ErrorResult& aRv);
- 
-   // Testing only.
-   void
-   GetScopeForUrl(const nsAString& aUrl, nsString& aScope, ErrorResult& aRv);
- 
-   // Testing only.
-   void
-   GetControllingWorkerScriptURLForPath(const nsAString& aPath,
-                                        nsString& aScriptURL,
-                                        ErrorResult& aRv);
- private:
-   ~ServiceWorkerContainer()
-   {
--    // FIXME(nsm): Bug 983497. Unhook from events.
-+    StopListeningForEvents();
-   }
- 
-+  void
-+  StartListeningForEvents();
-+
-+  void
-+  StopListeningForEvents();
-+
-   nsCOMPtr<nsPIDOMWindow> mWindow;
- };
- 
- } // namespace workers
- } // namespace dom
- } // namespace mozilla
- 
- #endif /* mozilla_dom_workers_serviceworkercontainer_h__ */
-diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp
---- a/dom/workers/ServiceWorkerManager.cpp
-+++ b/dom/workers/ServiceWorkerManager.cpp
-@@ -1,14 +1,15 @@
- /* 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 "ServiceWorkerManager.h"
- 
-+#include "nsIDOMEventTarget.h"
- #include "nsIDocument.h"
- #include "nsIScriptSecurityManager.h"
- #include "nsPIDOMWindow.h"
- 
- #include "jsapi.h"
- 
- #include "mozilla/Preferences.h"
- #include "mozilla/dom/BindingUtils.h"
-@@ -1299,16 +1300,29 @@ ServiceWorkerManager::GetDomainInfo(nsIU
-   if (NS_WARN_IF(NS_FAILED(rv))) {
-     return nullptr;
-   }
- 
-   ServiceWorkerDomainInfo* domainInfo = mDomainMap.Get(domain);
-   return domainInfo;
- }
- 
-+ServiceWorkerManager::ServiceWorkerDomainInfo*
-+ServiceWorkerManager::GetDomainInfo(const nsCString& aURL)
-+{
-+  AssertIsOnMainThread();
-+  nsCOMPtr<nsIURI> uri;
-+  nsresult rv = NS_NewURI(getter_AddRefs(uri), aURL, nullptr, nullptr);
-+  if (NS_WARN_IF(NS_FAILED(rv))) {
-+    return nullptr;
-+  }
-+
-+  return GetDomainInfo(uri);
-+}
-+
- NS_IMETHODIMP
- ServiceWorkerManager::MaybeStartControlling(nsIDocument* aDoc)
- {
-   AssertIsOnMainThread();
- 
-   ServiceWorkerDomainInfo* domainInfo = GetDomainInfo(aDoc);
-   if (!domainInfo) {
-     return NS_ERROR_FAILURE;
-@@ -1363,16 +1377,89 @@ ServiceWorkerManager::GetScopeForUrl(con
-       return NS_ERROR_FAILURE;
-   }
- 
-   aScope = NS_ConvertUTF8toUTF16(r->mScope);
-   return NS_OK;
- }
- 
- NS_IMETHODIMP
-+ServiceWorkerManager::AddContainerEventListener(nsIURI* aDocumentURI, nsIDOMEventTarget* aListener)
-+{
-+  MOZ_ASSERT(aDocumentURI);
-+  ServiceWorkerDomainInfo* domainInfo = GetDomainInfo(aDocumentURI);
-+  if (!domainInfo) {
-+    nsCString domain;
-+    nsresult rv = aDocumentURI->GetHost(domain);
-+    if (NS_WARN_IF(NS_FAILED(rv))) {
-+      return rv;
-+    }
-+
-+    domainInfo = new ServiceWorkerDomainInfo;
-+    mDomainMap.Put(domain, domainInfo);
-+  }
-+
-+  MOZ_ASSERT(domainInfo);
-+
-+  ServiceWorkerContainer* container = static_cast<ServiceWorkerContainer*>(aListener);
-+  domainInfo->mServiceWorkerContainers.AppendElement(container);
-+  return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+ServiceWorkerManager::RemoveContainerEventListener(nsIURI* aDocumentURI, nsIDOMEventTarget* aListener)
-+{
-+  MOZ_ASSERT(aDocumentURI);
-+  ServiceWorkerDomainInfo* domainInfo = GetDomainInfo(aDocumentURI);
-+  if (!domainInfo) {
-+    return NS_OK;
-+  }
-+
-+  ServiceWorkerContainer* container = static_cast<ServiceWorkerContainer*>(aListener);
-+  domainInfo->mServiceWorkerContainers.RemoveElement(container);
-+  return NS_OK;
-+}
-+
-+void
-+ServiceWorkerManager::FireEventOnServiceWorkerContainers(
-+  ServiceWorkerRegistration* aRegistration,
-+  const nsAString& aName)
-+{
-+  ServiceWorkerDomainInfo* domainInfo =
-+    GetDomainInfo(aRegistration->mScriptSpec);
-+
-+  if (domainInfo) {
-+    for (uint32_t i = 0; i < domainInfo->mServiceWorkerContainers.Length(); ++i) {
-+      ServiceWorkerContainer* target =
-+        domainInfo->mServiceWorkerContainers[i];
-+
-+      nsIURI* targetURI = target->GetDocumentURI();
-+      nsCString path;
-+      nsresult rv = targetURI->GetSpec(path);
-+      if (NS_WARN_IF(NS_FAILED(rv))) {
-+        continue;
-+      }
-+
-+      nsCString scope = FindScopeForPath(domainInfo->mOrderedScopes, path);
-+      if (scope.IsEmpty() ||
-+          !scope.Equals(aRegistration->mScope)) {
-+        continue;
-+      }
-+
-+      MOZ_ASSERT(target);
-+
-+      nsRefPtr<Event> event = new Event(target, nullptr, nullptr);
-+      event->InitEvent(aName, false, true);
-+      event->SetTrusted(true);
-+      target->DispatchDOMEvent(nullptr, event, nullptr, nullptr);
-+    }
-+  }
-+}
-+
-+NS_IMETHODIMP
- ServiceWorkerManager::CreateServiceWorker(const nsACString& aScriptSpec,
-                                           const nsACString& aScope,
-                                           ServiceWorker** aServiceWorker)
- {
-   AssertIsOnMainThread();
- 
-   WorkerPrivate::LoadInfo info;
-   nsresult rv = NS_NewURI(getter_AddRefs(info.mBaseURI), aScriptSpec, nullptr, nullptr);
-diff --git a/dom/workers/ServiceWorkerManager.h b/dom/workers/ServiceWorkerManager.h
---- a/dom/workers/ServiceWorkerManager.h
-+++ b/dom/workers/ServiceWorkerManager.h
-@@ -7,16 +7,17 @@
- 
- #include "nsIServiceWorkerManager.h"
- #include "nsCOMPtr.h"
- 
- #include "mozilla/Attributes.h"
- #include "mozilla/LinkedList.h"
- #include "mozilla/dom/BindingUtils.h"
- #include "mozilla/dom/Promise.h"
-+#include "mozilla/dom/ServiceWorkerContainer.h"
- #include "nsClassHashtable.h"
- #include "nsDataHashtable.h"
- #include "nsRefPtrHashtable.h"
- #include "nsTArrayForwardDeclare.h"
- #include "nsTWeakRef.h"
- 
- class nsIScriptError;
- 
-@@ -218,16 +219,22 @@ public:
-     // memmoves associated with inserting stuff in the middle of the array.
-     nsTArray<nsCString> mOrderedScopes;
- 
-     // Scope to registration.
-     nsRefPtrHashtable<nsCStringHashKey, ServiceWorkerRegistration> mServiceWorkerRegistrations;
- 
-     nsRefPtrHashtable<nsISupportsHashKey, ServiceWorkerRegistration> mControlledDocuments;
- 
-+    // This array can't be stored in ServiceWorkerRegistration because one may
-+    // not exist when a certain window is opened, but we still want that
-+    // window's container to be notified if it's in scope.
-+    // The containers inform the SWM on creation and destruction.
-+    nsTArray<nsRefPtr<ServiceWorkerContainer>> mServiceWorkerContainers;
-+
-     ServiceWorkerDomainInfo()
-     { }
- 
-     already_AddRefed<ServiceWorkerRegistration>
-     GetRegistration(const nsCString& aScope) const
-     {
-       nsRefPtr<ServiceWorkerRegistration> reg;
-       mServiceWorkerRegistrations.Get(aScope, getter_AddRefs(reg));
-@@ -313,16 +320,19 @@ private:
-                                   void *aUnused);
- 
-   ServiceWorkerDomainInfo*
-   GetDomainInfo(nsIDocument* aDoc);
- 
-   ServiceWorkerDomainInfo*
-   GetDomainInfo(nsIURI* aURI);
- 
-+  ServiceWorkerDomainInfo*
-+  GetDomainInfo(const nsCString& aURL);
-+
-   already_AddRefed<ServiceWorkerRegistration>
-   GetServiceWorkerRegistration(nsPIDOMWindow* aWindow);
- 
-   already_AddRefed<ServiceWorkerRegistration>
-   GetServiceWorkerRegistration(nsIDocument* aDoc);
- 
-   already_AddRefed<ServiceWorkerRegistration>
-   GetServiceWorkerRegistration(nsIURI* aURI);
-@@ -331,16 +341,20 @@ private:
-   AddScope(nsTArray<nsCString>& aList, const nsACString& aScope);
- 
-   static nsCString
-   FindScopeForPath(nsTArray<nsCString>& aList, const nsACString& aPath);
- 
-   static void
-   RemoveScope(nsTArray<nsCString>& aList, const nsACString& aScope);
- 
-+  void
-+  FireEventOnServiceWorkerContainers(ServiceWorkerRegistration* aRegistration,
-+                                     const nsAString& aName);
-+
- };
- 
- NS_DEFINE_STATIC_IID_ACCESSOR(ServiceWorkerManager,
-                               NS_SERVICEWORKERMANAGER_IMPL_IID);
- 
- } // namespace workers
- } // namespace dom
- } // namespace mozilla
--- a/series
+++ b/series
@@ -1,11 +1,9 @@
-983497-swc-events-infra+
 foojsapi
-983497-swc-events+
 1002570-swc-props
 1011268-swm-unregister
 sw-instance-events-and-state-2
 sw-instance-events-and-state
 903441-stuff
 898524-1-nowhite
 898524-2-nowhite
 857464-push-prefs