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

Unified Diff: src/api.cc

Issue 1813963002: Add memory pressure notification API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 647bd6e21bca049e94c62ce8cea89a8605acbe71..793b53016f62184c4bdeb0403d0d12308531646c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7586,6 +7586,11 @@ void Isolate::IsolateInBackgroundNotification() {
return isolate->heap()->SetOptimizeForMemoryUsage();
}
+void Isolate::MemoryPressureNotification(MemoryPressureLevel level) {
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
+ return isolate->heap()->MemoryPressureNotification(
+ static_cast<i::MemoryPressureLevel>(level), Locker::IsLocked(this));
jochen (gone - plz use gerrit) 2016/03/17 19:33:39 IsLocked() should never be true in blink, right?
ulan 2016/03/18 12:49:40 If V8 is not executing JS code and there is memory
+}
void Isolate::SetJitCodeEventHandler(JitCodeEventOptions options,
JitCodeEventHandler event_handler) {

Powered by Google App Engine
This is Rietveld 408576698