Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 0248030fc8f269c2dfc25e56579e521086a41a5c..4577255a9764eab5026a65f0fa30ec5ffb169ff9 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -4,6 +4,7 @@ |
#include "v8.h" |
+#include "compilation-cache.h" |
#include "execution.h" |
#include "factory.h" |
#include "macro-assembler.h" |
@@ -1062,6 +1063,7 @@ TEST(TestInternalWeakLists) { |
} |
// Mark compact handles the weak references. |
+ ISOLATE->compilation_cache()->Clear(); |
HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
CHECK_EQ(opt ? 4 : 0, CountOptimizedUserFunctions(ctx[i])); |
@@ -1392,6 +1394,7 @@ TEST(LeakGlobalContextViaMap) { |
ctx2->Exit(); |
ctx1->Exit(); |
ctx1.Dispose(); |
+ v8::V8::ContextDisposedNotification(); |
} |
HEAP->CollectAllAvailableGarbage(); |
CHECK_EQ(2, NumberOfGlobalObjects()); |
@@ -1429,6 +1432,7 @@ TEST(LeakGlobalContextViaFunction) { |
ctx2->Exit(); |
ctx1->Exit(); |
ctx1.Dispose(); |
+ v8::V8::ContextDisposedNotification(); |
} |
HEAP->CollectAllAvailableGarbage(); |
CHECK_EQ(2, NumberOfGlobalObjects()); |
@@ -1464,6 +1468,7 @@ TEST(LeakGlobalContextViaMapKeyed) { |
ctx2->Exit(); |
ctx1->Exit(); |
ctx1.Dispose(); |
+ v8::V8::ContextDisposedNotification(); |
} |
HEAP->CollectAllAvailableGarbage(); |
CHECK_EQ(2, NumberOfGlobalObjects()); |
@@ -1503,6 +1508,7 @@ TEST(LeakGlobalContextViaMapProto) { |
ctx2->Exit(); |
ctx1->Exit(); |
ctx1.Dispose(); |
+ v8::V8::ContextDisposedNotification(); |
} |
HEAP->CollectAllAvailableGarbage(); |
CHECK_EQ(2, NumberOfGlobalObjects()); |
@@ -2097,8 +2103,6 @@ TEST(IncrementalMarkingPreservesMonomorhpicIC) { |
Code* ic_before = FindFirstIC(f->shared()->code(), Code::LOAD_IC); |
CHECK(ic_before->ic_state() == MONOMORPHIC); |
- // Fire context dispose notification. |
- v8::V8::ContextDisposedNotification(); |
SimulateIncrementalMarking(); |
HEAP->CollectAllGarbage(Heap::kNoGCFlags); |