diff options
Diffstat (limited to 'deps/v8/test/cctest/test-mementos.cc')
-rw-r--r-- | deps/v8/test/cctest/test-mementos.cc | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/deps/v8/test/cctest/test-mementos.cc b/deps/v8/test/cctest/test-mementos.cc index 9662effa50..f59eef9485 100644 --- a/deps/v8/test/cctest/test-mementos.cc +++ b/deps/v8/test/cctest/test-mementos.cc @@ -29,8 +29,11 @@ using namespace v8::internal; +TEST(Regress340063) { + CcTest::InitializeVM(); + if (!i::FLAG_allocation_site_pretenuring) return; + v8::HandleScope scope(CcTest::isolate()); -static void SetUpNewSpaceWithPoisonedMementoAtTop() { Isolate* isolate = CcTest::i_isolate(); Heap* heap = isolate->heap(); NewSpace* new_space = heap->new_space(); @@ -49,31 +52,8 @@ static void SetUpNewSpaceWithPoisonedMementoAtTop() { memento->set_map_no_write_barrier(heap->allocation_memento_map()); memento->set_allocation_site( reinterpret_cast<AllocationSite*>(kHeapObjectTag), SKIP_WRITE_BARRIER); -} - - -TEST(Regress340063) { - CcTest::InitializeVM(); - if (!i::FLAG_allocation_site_pretenuring) return; - v8::HandleScope scope(CcTest::isolate()); - - - SetUpNewSpaceWithPoisonedMementoAtTop(); // Call GC to see if we can handle a poisonous memento right after the // current new space top pointer. - CcTest::i_isolate()->heap()->CollectAllGarbage( - Heap::kAbortIncrementalMarkingMask); -} - - -TEST(BadMementoAfterTopForceScavenge) { - CcTest::InitializeVM(); - if (!i::FLAG_allocation_site_pretenuring) return; - v8::HandleScope scope(CcTest::isolate()); - - SetUpNewSpaceWithPoisonedMementoAtTop(); - - // Force GC to test the poisoned memento handling - CcTest::i_isolate()->heap()->CollectGarbage(i::NEW_SPACE); + heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); } |