Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 4d7a4658f0618ec79a557f74f212ca2250cfd57e..c8d3c2170bde104eb800ab3a7e46a8734531d38a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -8686,7 +8686,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); |
{ |
@@ -8696,6 +8695,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()) { |
Yang
2017/04/11 13:09:46
IsAbstractCode
kozy
2017/04/12 15:05:17
Done.
|
+ i::AbstractCode::cast(obj)->DropStackFrameCache(); |
+ } |
+ } |
+ } |
} |