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

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

Issue 413133006: Revert "Revert of [oilpan]: Change marking to do precise roots first and conservative second. (http… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: moved RELEASE_ASSERT Created 6 years, 5 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
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index 1309cddf5f5ba9aba34d6124711fd8468dcc55d5..679b55c023f9887efc5ce9f13edcb9ce89a3664e 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -4660,8 +4660,6 @@ public:
// shutting it down.
stackPtrValue = reinterpret_cast<uintptr_t>(cto.get());
}
- RELEASE_ASSERT(stackPtrValue);
-
// At this point it is "programatically" okay to shut down the worker thread
// since the cto object should be dead. However out stackPtrValue will cause a
// trace of the object when doing a conservative GC.
@@ -4685,6 +4683,13 @@ public:
EXPECT_EQ(0, CrossThreadObject::s_destructorCalls);
EXPECT_EQ(1, IntWrapper::s_destructorCalls);
+ // This release assert is here to ensure the stackValuePtr is not
+ // optimized away before doing the above conservative GC. If the
+ // EXPECT_EQ(0, CrossThreadObject::s_destructorCalls) call above
+ // starts failing it means we have to find a better way to ensure
+ // the stackPtrValue is not optimized away.
+ RELEASE_ASSERT(stackPtrValue);
+
// Do a GC with no pointers on the stack to see the cto being collected.
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
EXPECT_EQ(1, CrossThreadObject::s_destructorCalls);
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698