Index: Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
index 8263534e4960248864a62d0c3ef9d2fd30bb4624..8dec770f0fcd8c6c30bd3afe1fa119b7bb8554b7 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
@@ -40,6 +40,7 @@ |
#include "core/dom/ExecutionContext.h" |
#include "core/dom/MessagePort.h" |
#include "core/events/MessageEvent.h" |
+#include "modules/EventTargetModules.h" |
#include "modules/serviceworkers/ServiceWorker.h" |
#include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
#include "modules/serviceworkers/ServiceWorkerError.h" |
@@ -98,6 +99,8 @@ void ServiceWorkerContainer::trace(Visitor* visitor) |
visitor->trace(m_controller); |
visitor->trace(m_readyRegistration); |
visitor->trace(m_ready); |
+ EventTargetWithInlineData::trace(visitor); |
+ HeapSupplementable<ServiceWorkerContainer>::trace(visitor); |
} |
ScriptPromise ServiceWorkerContainer::registerServiceWorker(ScriptState* scriptState, const String& url, const RegistrationOptions& options) |
@@ -220,6 +223,8 @@ void ServiceWorkerContainer::setController(WebServiceWorker* serviceWorker) |
return; |
} |
m_controller = ServiceWorker::from(executionContext(), serviceWorker); |
+ if (m_controller.get()) |
+ dispatchEvent(Event::create(EventTypeNames::controllerchange)); |
michaeln
2014/11/14 22:53:55
This event should only be raised in the skipWaitin
xiang
2014/11/28 08:00:48
Done.
|
} |
void ServiceWorkerContainer::setReadyRegistration(WebServiceWorkerRegistration* registration) |
@@ -252,6 +257,11 @@ void ServiceWorkerContainer::dispatchMessageEvent(const WebString& message, cons |
executionContext()->executingWindow()->dispatchEvent(MessageEvent::create(ports.release(), value)); |
} |
+const AtomicString& ServiceWorkerContainer::interfaceName() const |
+{ |
+ return EventTargetNames::ServiceWorkerContainer; |
+} |
+ |
ServiceWorkerContainer::ServiceWorkerContainer(ExecutionContext* executionContext) |
: ContextLifecycleObserver(executionContext) |
, m_provider(0) |