Chromium Code Reviews| 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); |