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

Unified Diff: third_party/WebKit/Source/platform/heap/ThreadState.cpp

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/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 5dade81422fb90875c853471da1f73fa91d9e779..1ea1f8ce6626646f26a27849ea0dc717a5f5278e 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -101,6 +101,9 @@ ThreadState::ThreadState()
, m_shouldFlushHeapDoesNotContainCache(false)
, m_gcState(NoGCScheduled)
, m_traceDOMWrappers(nullptr)
+#if ENABLE(ASSERT)
+ , m_numberOfSelfRefs(0)
+#endif
#if defined(ADDRESS_SANITIZER)
, m_asanFakeStack(__asan_get_current_fake_stack())
#endif
@@ -287,7 +290,7 @@ void ThreadState::cleanup()
}
// We should not have any persistents left when getting to this point,
// if we have it is probably a bug so adding a debug ASSERT to catch this.
- ASSERT(!currentCount);
+ ASSERT(currentCount == m_numberOfSelfRefs);
sof 2015/11/24 08:41:47 If this holds, tell the persistentRegion() to clea
// All of pre-finalizers should be consumed.
ASSERT(m_orderedPreFinalizers.isEmpty());
RELEASE_ASSERT(gcState() == NoGCScheduled);

Powered by Google App Engine
This is Rietveld 408576698