| Index: Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| index 64fcd755b72c7d0298f80ec5b3895242a362f8e2..a28c9313c0112c090b29f0d88f835a425a29655c 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| @@ -38,6 +38,7 @@
|
| #include "modules/serviceworkers/ServiceWorker.h"
|
| #include "modules/serviceworkers/ServiceWorkerContainerClient.h"
|
| #include "modules/serviceworkers/ServiceWorkerError.h"
|
| +#include "public/platform/WebServiceWorker.h"
|
| #include "public/platform/WebServiceWorkerProvider.h"
|
| #include "public/platform/WebString.h"
|
| #include "public/platform/WebURL.h"
|
| @@ -114,8 +115,16 @@ ScriptPromise ServiceWorkerContainer::unregisterServiceWorker(ExecutionContext*
|
| return promise;
|
| }
|
|
|
| +void ServiceWorkerContainer::setCurrentServiceWorker(blink::WebServiceWorker* serviceWorker)
|
| +{
|
| + if (!executionContext())
|
| + return;
|
| + m_current = ServiceWorker::create(executionContext(), adoptPtr(serviceWorker));
|
| +}
|
| +
|
| ServiceWorkerContainer::ServiceWorkerContainer(ExecutionContext* executionContext)
|
| - : m_provider(0)
|
| + : ContextLifecycleObserver(executionContext)
|
| + , m_provider(0)
|
| {
|
| ScriptWrappable::init(this);
|
|
|
|
|