| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index b8d9166cb7e3d342e6d4e886d70bb74daf2d3679..65f79ecc5c2d31f4668bb451ca92e455141ddb72 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -14,6 +14,7 @@
|
| #include "src/allocation.h"
|
| #include "src/assert-scope.h"
|
| #include "src/base/atomic-utils.h"
|
| +#include "src/debug/debug-interface.h"
|
| #include "src/globals.h"
|
| #include "src/heap-symbols.h"
|
| #include "src/list.h"
|
| @@ -846,6 +847,9 @@ class Heap {
|
| bool is_isolate_locked);
|
| void CheckMemoryPressure();
|
|
|
| + void SetOutOfMemoryCallback(v8::debug::OutOfMemoryCallback callback,
|
| + void* data);
|
| +
|
| double MonotonicallyIncreasingTimeInMs();
|
|
|
| void RecordStats(HeapStats* stats, bool take_snapshot = false);
|
| @@ -1759,6 +1763,8 @@ class Heap {
|
|
|
| void CollectGarbageOnMemoryPressure();
|
|
|
| + void InvokeOutOfMemoryCallback();
|
| +
|
| // Attempt to over-approximate the weak closure by marking object groups and
|
| // implicit references from global handles, but don't atomically complete
|
| // marking. If we continue to mark incrementally, we might have marked
|
| @@ -2169,6 +2175,9 @@ class Heap {
|
| // and reset by a mark-compact garbage collection.
|
| base::AtomicValue<MemoryPressureLevel> memory_pressure_level_;
|
|
|
| + v8::debug::OutOfMemoryCallback out_of_memory_callback_;
|
| + void* out_of_memory_callback_data_;
|
| +
|
| // For keeping track of context disposals.
|
| int contexts_disposed_;
|
|
|
|
|