| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index a6315d15f1e24778f436cb93752d1a4eddbb52ab..78b1a1e9c80adaa54e71491beb782b164e0515a4 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -397,7 +397,7 @@ static void TestWeakGlobalHandleCallback(v8::Isolate* isolate,
|
| v8::Persistent<v8::Value>* handle,
|
| void* id) {
|
| if (1234 == reinterpret_cast<intptr_t>(id)) WeakPointerCleared = true;
|
| - handle->Dispose();
|
| + handle->Reset();
|
| }
|
|
|
|
|
| @@ -1787,12 +1787,12 @@ TEST(LeakNativeContextViaMap) {
|
| ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
|
| ctx2->Exit();
|
| v8::Local<v8::Context>::New(isolate, ctx1)->Exit();
|
| - ctx1p.Dispose();
|
| + ctx1p.Reset();
|
| v8::V8::ContextDisposedNotification();
|
| }
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(2, NumberOfGlobalObjects());
|
| - ctx2p.Dispose();
|
| + ctx2p.Reset();
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, NumberOfGlobalObjects());
|
| }
|
| @@ -1833,12 +1833,12 @@ TEST(LeakNativeContextViaFunction) {
|
| ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
|
| ctx2->Exit();
|
| ctx1->Exit();
|
| - ctx1p.Dispose();
|
| + ctx1p.Reset();
|
| v8::V8::ContextDisposedNotification();
|
| }
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(2, NumberOfGlobalObjects());
|
| - ctx2p.Dispose();
|
| + ctx2p.Reset();
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, NumberOfGlobalObjects());
|
| }
|
| @@ -1877,12 +1877,12 @@ TEST(LeakNativeContextViaMapKeyed) {
|
| ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
|
| ctx2->Exit();
|
| ctx1->Exit();
|
| - ctx1p.Dispose();
|
| + ctx1p.Reset();
|
| v8::V8::ContextDisposedNotification();
|
| }
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(2, NumberOfGlobalObjects());
|
| - ctx2p.Dispose();
|
| + ctx2p.Reset();
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, NumberOfGlobalObjects());
|
| }
|
| @@ -1925,12 +1925,12 @@ TEST(LeakNativeContextViaMapProto) {
|
| ctx2->Global()->Set(v8_str("o"), v8::Int32::New(0));
|
| ctx2->Exit();
|
| ctx1->Exit();
|
| - ctx1p.Dispose();
|
| + ctx1p.Reset();
|
| v8::V8::ContextDisposedNotification();
|
| }
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(2, NumberOfGlobalObjects());
|
| - ctx2p.Dispose();
|
| + ctx2p.Reset();
|
| CcTest::heap()->CollectAllAvailableGarbage();
|
| CHECK_EQ(0, NumberOfGlobalObjects());
|
| }
|
| @@ -3570,6 +3570,8 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
|
| v8::internal::Heap* heap = CcTest::heap();
|
| GlobalHandles* global_handles = isolate->global_handles();
|
|
|
| + if (!isolate->use_crankshaft()) return;
|
| +
|
| // The allocation site at the head of the list is ours.
|
| Handle<AllocationSite> site;
|
| {
|
|
|