| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index ca173c25a56b131bb8c871e9ed40903562e77099..3dca2c163a9ce871a9878f1fd15cb950fb2a5e7e 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -3103,3 +3103,19 @@ TEST(DeferredHandles) {
|
| isolate->handle_scope_implementer()->Iterate(&visitor);
|
| deferred.Detach();
|
| }
|
| +
|
| +
|
| +TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) {
|
| + CcTest::InitializeVM();
|
| + v8::HandleScope scope(CcTest::isolate());
|
| + CompileRun("function f(n) {"
|
| + " var a = new Array(n);"
|
| + " for (var i = 0; i < n; i += 100) a[i] = i;"
|
| + "};"
|
| + "f(10 * 1024 * 1024);");
|
| + IncrementalMarking* marking = HEAP->incremental_marking();
|
| + if (marking->IsStopped()) marking->Start();
|
| + // This big step should be sufficient to mark the whole array.
|
| + marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
|
| + ASSERT(marking->IsComplete());
|
| +}
|
|
|