Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: src/api.cc

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« include/v8.h ('K') | « include/v8.h ('k') | src/ast/ast-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
+ }
+ }
}
« include/v8.h ('K') | « include/v8.h ('k') | src/ast/ast-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698