| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 41f86041e9f0e86b703c486a23347574cd275502..1b880f23a8fcd4097a4b11390723c84904838f1d 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -8669,7 +8669,6 @@ bool Isolate::IdleNotificationDeadline(double deadline_in_seconds) {
|
| return isolate->heap()->IdleNotification(deadline_in_seconds);
|
| }
|
|
|
| -
|
| void Isolate::LowMemoryNotification() {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
|
| {
|
| @@ -8679,6 +8678,15 @@ void Isolate::LowMemoryNotification() {
|
| isolate->heap()->CollectAllAvailableGarbage(
|
| i::GarbageCollectionReason::kLowMemoryNotification);
|
| }
|
| + {
|
| + i::HeapIterator iterator(isolate->heap());
|
| + i::HeapObject* obj;
|
| + while ((obj = iterator.next()) != nullptr) {
|
| + if (obj->IsCode() || obj->IsBytecodeArray()) {
|
| + i::AbstractCode::cast(obj)->DropStackFrameCache();
|
| + }
|
| + }
|
| + }
|
| }
|
|
|
|
|
|
|