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

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

Issue 1227413003: Oilpan: tidy HeapTest.VectorDestructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 de59c0d73a0e12c5821ac22323575ea7d01fe473..ce73f24ff03760e8c9f08f34f51f19bf677399c7 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -4244,13 +4244,9 @@ TEST(HeapTest, VectorDestructors)
InlinedVectorObject::s_destructorCalls = 0;
{
- auto const heapObject = new InlinedVectorObjectWrapper();
+ Persistent<InlinedVectorObjectWrapper> vectorWrapper = new InlinedVectorObjectWrapper();
Heap::collectGarbage(ThreadState::HeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
EXPECT_EQ(2, InlinedVectorObject::s_destructorCalls);
- // Force compiler to keep |heapObject| variable on the stack
- // while collectGarbage() is working.
- // Otherwise GC would think that it's safe to collect the object.
- EXPECT_TRUE(heapObject);
}
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
EXPECT_LE(8, InlinedVectorObject::s_destructorCalls);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698