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

Unified Diff: src/isolate.cc

Issue 2218703004: Unify memory optimization modes and flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: x Created 4 years, 4 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
« no previous file with comments | « src/isolate.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index c006d6f46b73ae20c9b13a26aa0d1af6afe10ade..859d91381b1c290b2b14a9523656739a82bef2e7 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1998,6 +1998,7 @@ Isolate::Isolate(bool enable_serializer)
has_fatal_error_(false),
initialized_from_snapshot_(false),
is_tail_call_elimination_enabled_(true),
+ is_isolate_in_background_(false),
cpu_profiler_(NULL),
heap_profiler_(NULL),
code_event_dispatcher_(new CodeEventDispatcher()),
@@ -3172,6 +3173,15 @@ void Isolate::SetRAILMode(RAILMode rail_mode) {
}
}
+void Isolate::IsolateInBackgroundNotification() {
+ is_isolate_in_background_ = false;
+ heap()->ActivateMemoryReducerIfNeeded();
+}
+
+void Isolate::IsolateInForegroundNotification() {
+ is_isolate_in_background_ = true;
+}
+
bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
StackGuard* stack_guard = isolate_->stack_guard();
#ifdef USE_SIMULATOR
« no previous file with comments | « src/isolate.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698