Run test-heap/NoWeakHashTableLeakWithIncrementalMarking with a clean slate.
authoryangguo <yangguo@chromium.org>
Thu, 7 May 2015 08:37:50 +0000 (01:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 7 May 2015 08:37:55 +0000 (08:37 +0000)
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1132493002

Cr-Commit-Position: refs/heads/master@{#28286}

test/cctest/test-heap.cc

index f000a6a2311ae71c731c41ed48b0b22c72d3d60e..e4f2f2bf86561cfa3985791d5104e52a9cad9040 100644 (file)
@@ -31,6 +31,7 @@
 #include "src/v8.h"
 
 #include "src/compilation-cache.h"
+#include "src/deoptimizer.h"
 #include "src/execution.h"
 #include "src/factory.h"
 #include "src/global-handles.h"
@@ -4342,6 +4343,10 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) {
   Isolate* isolate = CcTest::i_isolate();
   v8::internal::Heap* heap = CcTest::heap();
 
+  // Get a clean slate regarding optimized functions on the heap.
+  i::Deoptimizer::DeoptimizeAll(isolate);
+  heap->CollectAllGarbage();
+
   if (!isolate->use_crankshaft()) return;
   HandleScope outer_scope(heap->isolate());
   for (int i = 0; i < 3; i++) {