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

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

Issue 669423002: Only dispose proxy-less WebServiceWorkerRegistration objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | Source/modules/serviceworkers/ServiceWorkerRegistration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698