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

Unified Diff: third_party/WebKit/Source/platform/heap/Handle.h

Issue 1472823002: Couple V8AbstractEventListener's lifetime to the V8 listeners lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ignore self refs Created 5 years, 1 month 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: third_party/WebKit/Source/platform/heap/Handle.h
diff --git a/third_party/WebKit/Source/platform/heap/Handle.h b/third_party/WebKit/Source/platform/heap/Handle.h
index 64e43fd71243011277fb2052e26dfe146148b0dc..763c55e8677cc5ad1dfd355fbc4d2028895c925b 100644
--- a/third_party/WebKit/Source/platform/heap/Handle.h
+++ b/third_party/WebKit/Source/platform/heap/Handle.h
@@ -1236,6 +1236,10 @@ public:
void clear()
{
+#if ENABLE(ASSERT)
+ if (m_keepAlive)
+ ThreadState::current()->decrementNumberOfSelfRefs();
+#endif
m_keepAlive.clear();
}
@@ -1247,6 +1251,9 @@ private:
{
ASSERT(!m_keepAlive || m_keepAlive.get() == self);
m_keepAlive = self;
+#if ENABLE(ASSERT)
+ ThreadState::current()->incrementNumberOfSelfRefs();
+#endif
}
GC_PLUGIN_IGNORE("420515")

Powered by Google App Engine
This is Rietveld 408576698