| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 26ebfa8a6775163c01e75c00d54e728fc950ecdf..b35dd951a578965fc254491fb2a2b6b6e6122200 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -7153,6 +7153,10 @@ void Isolate::RequestInterrupt(InterruptCallback callback, void* data) {
|
| isolate->RequestInterrupt(callback, data);
|
| }
|
|
|
| +void Isolate::RequestMemoryPressureInterrupt(MemoryPressureLevel level) {
|
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
|
| + isolate->RequestMemoryPressureInterrupt(level);
|
| +}
|
|
|
| void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) {
|
| CHECK(i::FLAG_expose_gc);
|
| @@ -7739,6 +7743,14 @@ void Isolate::VisitWeakHandles(PersistentHandleVisitor* visitor) {
|
| &visitor_adapter);
|
| }
|
|
|
| +void Isolate::HandleMemoryPressureInterrupt() {
|
| + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
|
| + {
|
| + i::HistogramTimerScope idle_notification_scope(
|
| + isolate->counters()->gc_low_memory_notification());
|
| + isolate->stack_guard()->HandleMemoryPressureInterrupt();
|
| + }
|
| +}
|
|
|
| MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type)
|
| : isolate_(reinterpret_cast<i::Isolate*>(isolate)),
|
|
|