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

Unified Diff: Source/platform/heap/Heap.cpp

Issue 1166793002: Oilpan: add assert to verify eager finalization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/platform/heap/Heap.cpp
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
index d4ab0e40432e6cf8f45c5157c92622073e1e2fce..147a16564449735ae58332ab87bca341032eb812 100644
--- a/Source/platform/heap/Heap.cpp
+++ b/Source/platform/heap/Heap.cpp
@@ -456,9 +456,18 @@ void BaseHeap::completeSweep()
ASSERT(threadState()->sweepForbidden());
ASSERT(!threadState()->isMainThread() || ScriptForbiddenScope::isScriptForbidden());
- while (m_firstUnsweptPage) {
+#if ENABLE(ASSERT)
+ if (heapIndex() == EagerSweepHeapIndex)
+ threadState()->enterEagerSweepScope();
+#endif
+
+ while (m_firstUnsweptPage)
sweepUnsweptPage();
- }
+
+#if ENABLE(ASSERT)
+ if (heapIndex() == EagerSweepHeapIndex)
+ threadState()->leaveEagerSweepScope();
+#endif
}
NormalPageHeap::NormalPageHeap(ThreadState* state, int index)

Powered by Google App Engine
This is Rietveld 408576698