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

Side by Side Diff: src/isolate.cc

Issue 2245483004: Fix wrong state of IsolateInBackgroundNotification and IsolateInForegroundNotification. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after
3167 } 3167 }
3168 3168
3169 void Isolate::SetRAILMode(RAILMode rail_mode) { 3169 void Isolate::SetRAILMode(RAILMode rail_mode) {
3170 rail_mode_.SetValue(rail_mode); 3170 rail_mode_.SetValue(rail_mode);
3171 if (FLAG_trace_rail) { 3171 if (FLAG_trace_rail) {
3172 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); 3172 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode));
3173 } 3173 }
3174 } 3174 }
3175 3175
3176 void Isolate::IsolateInBackgroundNotification() { 3176 void Isolate::IsolateInBackgroundNotification() {
3177 is_isolate_in_background_ = false; 3177 is_isolate_in_background_ = true;
3178 heap()->ActivateMemoryReducerIfNeeded(); 3178 heap()->ActivateMemoryReducerIfNeeded();
3179 } 3179 }
3180 3180
3181 void Isolate::IsolateInForegroundNotification() { 3181 void Isolate::IsolateInForegroundNotification() {
3182 is_isolate_in_background_ = true; 3182 is_isolate_in_background_ = false;
3183 } 3183 }
3184 3184
3185 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { 3185 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
3186 StackGuard* stack_guard = isolate_->stack_guard(); 3186 StackGuard* stack_guard = isolate_->stack_guard();
3187 #ifdef USE_SIMULATOR 3187 #ifdef USE_SIMULATOR
3188 // The simulator uses a separate JS stack. 3188 // The simulator uses a separate JS stack.
3189 Address jssp_address = Simulator::current(isolate_)->get_sp(); 3189 Address jssp_address = Simulator::current(isolate_)->get_sp();
3190 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); 3190 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address);
3191 if (jssp - gap < stack_guard->real_jslimit()) return true; 3191 if (jssp - gap < stack_guard->real_jslimit()) return true;
3192 #endif // USE_SIMULATOR 3192 #endif // USE_SIMULATOR
(...skipping 12 matching lines...) Expand all
3205 // Then check whether this scope intercepts. 3205 // Then check whether this scope intercepts.
3206 if ((flag & intercept_mask_)) { 3206 if ((flag & intercept_mask_)) {
3207 intercepted_flags_ |= flag; 3207 intercepted_flags_ |= flag;
3208 return true; 3208 return true;
3209 } 3209 }
3210 return false; 3210 return false;
3211 } 3211 }
3212 3212
3213 } // namespace internal 3213 } // namespace internal
3214 } // namespace v8 3214 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698