Index: Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
index 8369a9a519cc7c5f07882706121eb3fa9ab3e545..4ff54d1bd11d1b975e50308788614944896fb173 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerContainer.cpp |
@@ -207,12 +207,6 @@ static void deleteIfNoExistingOwner(WebServiceWorker* serviceWorker) |
delete serviceWorker; |
} |
-static void deleteIfNoExistingOwner(WebServiceWorkerRegistration* registration) |
-{ |
- if (registration && !registration->proxy()) |
- delete registration; |
-} |
- |
void ServiceWorkerContainer::setController(WebServiceWorker* serviceWorker) |
{ |
if (!executionContext()) { |
@@ -225,7 +219,7 @@ void ServiceWorkerContainer::setController(WebServiceWorker* serviceWorker) |
void ServiceWorkerContainer::setReadyRegistration(WebServiceWorkerRegistration* registration) |
{ |
if (!executionContext()) { |
- deleteIfNoExistingOwner(registration); |
+ ServiceWorkerRegistration::dispose(registration); |
return; |
} |