| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index b500ef41fb16036a63982b6c0f46c25f19f861ab..343c7ad5a522985b6b4abbae505e07b391d8f8d7 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -512,7 +512,8 @@ StartupData SnapshotCreator::CreateBlob(
|
|
|
| // If we don't do this then we end up with a stray root pointing at the
|
| // context even after we have disposed of the context.
|
| - isolate->heap()->CollectAllAvailableGarbage("mksnapshot");
|
| + isolate->heap()->CollectAllAvailableGarbage(
|
| + i::GarbageCollectionReason::kSnapshotCreator);
|
| isolate->heap()->CompactWeakFixedArrays();
|
|
|
| i::DisallowHeapAllocation no_gc_from_here_on;
|
| @@ -7477,8 +7478,7 @@ Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) {
|
| void Isolate::ReportExternalAllocationLimitReached() {
|
| i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
|
| if (heap->gc_state() != i::Heap::NOT_IN_GC) return;
|
| - heap->ReportExternalMemoryPressure(
|
| - "external memory allocation limit reached.");
|
| + heap->ReportExternalMemoryPressure();
|
| }
|
|
|
|
|
| @@ -7638,13 +7638,13 @@ void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) {
|
| CHECK(i::FLAG_expose_gc);
|
| if (type == kMinorGarbageCollection) {
|
| reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage(
|
| - i::NEW_SPACE, "Isolate::RequestGarbageCollection",
|
| + i::NEW_SPACE, i::GarbageCollectionReason::kTesting,
|
| kGCCallbackFlagForced);
|
| } else {
|
| DCHECK_EQ(kFullGarbageCollection, type);
|
| reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
|
| i::Heap::kAbortIncrementalMarkingMask,
|
| - "Isolate::RequestGarbageCollection", kGCCallbackFlagForced);
|
| + i::GarbageCollectionReason::kTesting, kGCCallbackFlagForced);
|
| }
|
| }
|
|
|
| @@ -8073,7 +8073,8 @@ void Isolate::LowMemoryNotification() {
|
| i::HistogramTimerScope idle_notification_scope(
|
| isolate->counters()->gc_low_memory_notification());
|
| TRACE_EVENT0("v8", "V8.GCLowMemoryNotification");
|
| - isolate->heap()->CollectAllAvailableGarbage("low memory notification");
|
| + isolate->heap()->CollectAllAvailableGarbage(
|
| + i::GarbageCollectionReason::kLowMemoryNotification);
|
| }
|
| }
|
|
|
|
|