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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerRegistration.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 | « Source/modules/serviceworkers/ServiceWorkerContainer.cpp ('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 a23cab98b7b955de535a6fad48827c00f4df716d..999df873b2cd8487d0d6f81d3a3195d22beb8d7d 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -90,7 +90,8 @@ ServiceWorkerRegistration* ServiceWorkerRegistration::take(ScriptPromiseResolver
void ServiceWorkerRegistration::dispose(WebType* registration)
{
- delete registration;
+ if (registration && !registration->proxy())
+ delete registration;
}
String ServiceWorkerRegistration::scope() const
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698