| Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| index 455cc300237680851e5e2f79210cf2b0e04b751b..ecdf859ec10044a444cf96871151497c9d6c539b 100644
|
| --- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
|
| @@ -154,13 +154,13 @@ ScriptPromise ServiceWorkerGlobalScope::skipWaiting(ScriptState* scriptState)
|
| return promise;
|
| }
|
|
|
| -void ServiceWorkerGlobalScope::setRegistration(WebServiceWorkerRegistration* registration)
|
| +void ServiceWorkerGlobalScope::setRegistration(WebServiceWorkerRegistration* registrationRaw)
|
| {
|
| - if (!executionContext()) {
|
| - ServiceWorkerRegistration::dispose(registration);
|
| + ASSERT(registrationRaw);
|
| + OwnPtr<WebServiceWorkerRegistration> registration = adoptPtr(registrationRaw);
|
| + if (!executionContext())
|
| return;
|
| - }
|
| - m_registration = ServiceWorkerRegistration::from(executionContext(), registration);
|
| + m_registration = ServiceWorkerRegistration::create(executionContext(), registration.release());
|
| }
|
|
|
| bool ServiceWorkerGlobalScope::addEventListener(const AtomicString& eventType, PassRefPtrWillBeRawPtr<EventListener> listener, bool useCapture)
|
|
|