Index: test/cctest/test-mementos.cc |
diff --git a/test/cctest/test-mementos.cc b/test/cctest/test-mementos.cc |
index 4c85151b88c11ed1a7cc11999c1393f62336df75..391c934475e86d6f51a45a16566e111256905700 100644 |
--- a/test/cctest/test-mementos.cc |
+++ b/test/cctest/test-mementos.cc |
@@ -58,9 +58,26 @@ TEST(Regress340063) { |
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(Regress470390) { |
+ CcTest::InitializeVM(); |
+ if (!i::FLAG_allocation_site_pretenuring) return; |
+ v8::HandleScope scope(CcTest::isolate()); |
SetUpNewSpaceWithPoisonedMementoAtTop(); |
+ // Set the new space limit to be equal to the top. |
+ Address top = CcTest::i_isolate()->heap()->new_space()->top(); |
+ *(CcTest::i_isolate()->heap()->new_space()->allocation_limit_address()) = top; |
+ |
// Call GC to see if we can handle a poisonous memento right after the |
// current new space top pointer. |
CcTest::i_isolate()->heap()->CollectAllGarbage( |