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

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

Issue 874003002: Oilpan: dispose ServiceWorker (and registration) objects earlier. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index ba7061c3247cf0dc2dfcb425fca63af985c43a52..11d5494a8cd3739e88b8da2a0846b964db8a952d 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -144,6 +144,7 @@ ServiceWorkerRegistration::ServiceWorkerRegistration(ExecutionContext* execution
, m_provider(0)
, m_stopped(false)
{
+ WILL_REGISTER_PREFINALIZER(this);
ASSERT(m_outerRegistration);
if (!executionContext)
@@ -176,4 +177,11 @@ void ServiceWorkerRegistration::stop()
m_outerRegistration->proxyStopped();
}
+void ServiceWorkerRegistration::dispose()
+{
+ // See ServiceWorker::dispose() comment why this explicit dispose() action is needed.
+ m_outerRegistration.clear();
haraken 2015/01/26 01:39:42 Can we add ASSERT(!m_outerRegistration) to ~Servic
sof 2015/01/26 10:06:57 Done.
+}
+
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698