Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 469273002: ServiceWorker: Fix ServiceWorkerRegistration object handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerRegistration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index 455cf938f645e0b621a2c6ab62ad3218c7b28b06..79fe95c0e3c9f2479782bb7cb52133aa061e5484 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -88,7 +88,7 @@ PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> ServiceWorkerRegistration::tak
{
if (!registration)
return nullptr;
- return getOrCreate(resolver->scriptState()->executionContext(), adoptPtr(registration));
+ return getOrCreate(resolver->scriptState()->executionContext(), registration);
}
void ServiceWorkerRegistration::dispose(WebType* registration)
@@ -123,7 +123,7 @@ ScriptPromise ServiceWorkerRegistration::unregister(ScriptState* scriptState)
return promise;
}
-PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> ServiceWorkerRegistration::getOrCreate(ExecutionContext* executionContext, PassOwnPtr<WebServiceWorkerRegistration> outerRegistration)
+PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> ServiceWorkerRegistration::getOrCreate(ExecutionContext* executionContext, WebServiceWorkerRegistration* outerRegistration)
{
if (!outerRegistration)
return nullptr;
@@ -137,7 +137,7 @@ PassRefPtrWillBeRawPtr<ServiceWorkerRegistration> ServiceWorkerRegistration::get
}
}
- RefPtrWillBeRawPtr<ServiceWorkerRegistration> registration = adoptRefWillBeRefCountedGarbageCollected(new ServiceWorkerRegistration(executionContext, outerRegistration));
+ RefPtrWillBeRawPtr<ServiceWorkerRegistration> registration = adoptRefWillBeRefCountedGarbageCollected(new ServiceWorkerRegistration(executionContext, adoptPtr(outerRegistration)));
registration->suspendIfNeeded();
return registration.release();
}
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerRegistration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698