diff --git a/src/heap/paged-spaces.cc b/src/heap/paged-spaces.cc index ceca34d6aa..5a979efb7d 100644 --- a/src/heap/paged-spaces.cc +++ b/src/heap/paged-spaces.cc @@ -529,6 +529,12 @@ bool PagedSpace::RefillLinearAllocationAreaFromFreeList( // if it is big enough. FreeLinearAllocationArea(); + if (!is_local_space()) { + heap()->StartIncrementalMarkingIfAllocationLimitIsReached( + heap()->GCFlagsForIncrementalMarking(), + kGCCallbackScheduleIdleGarbageCollection); + } + size_t new_node_size = 0; FreeSpace new_node = free_list_->Allocate(size_in_bytes, &new_node_size, origin); @@ -1014,15 +1020,6 @@ AllocationResult PagedSpace::AllocateRawSlow(int size_in_bytes, top_on_previous_step_ ? top() - top_on_previous_step_ : 0; DCHECK_IMPLIES(!SupportsInlineAllocation(), bytes_since_last == 0); - if (!is_local_space()) { - // Start incremental marking before the actual allocation, this allows the - // allocation function to mark the object black when incremental marking is - // running. - heap()->StartIncrementalMarkingIfAllocationLimitIsReached( - heap()->GCFlagsForIncrementalMarking(), - kGCCallbackScheduleIdleGarbageCollection); - } - #ifdef V8_HOST_ARCH_32_BIT AllocationResult result = alignment != kWordAligned diff --git a/test/cctest/heap/test-external-string-tracker.cc b/test/cctest/heap/test-external-string-tracker.cc index 001ae25c20..28ddc7b69c 100644 --- a/test/cctest/heap/test-external-string-tracker.cc +++ b/test/cctest/heap/test-external-string-tracker.cc @@ -130,7 +130,6 @@ TEST(ExternalString_ExternalBackingStoreSizeIncreasesMarkCompact) { } TEST(ExternalString_ExternalBackingStoreSizeIncreasesAfterExternalization) { - ManualGCScope manual_gc_scope; CcTest::InitializeVM(); LocalContext env; v8::Isolate* isolate = env->GetIsolate(); diff --git a/test/unittests/logging/counters-unittest.cc b/test/unittests/logging/counters-unittest.cc index 657ea4d163..35b766d3bd 100644 --- a/test/unittests/logging/counters-unittest.cc +++ b/test/unittests/logging/counters-unittest.cc @@ -726,7 +726,6 @@ TEST_F(RuntimeCallStatsTest, CallbackFunction) { TEST_F(RuntimeCallStatsTest, ApiGetter) { FLAG_allow_natives_syntax = true; - FLAG_incremental_marking = false; RuntimeCallCounter* callback_counter = stats()->GetCounter(RuntimeCallCounterId::kFunctionCallback);