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

Unified Diff: src/isolate.cc

Issue 1203873005: Ensure there is some space on JS stack available for bootstrapping. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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') | no next file » | 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 17f480c1d5a4c249da957814e7937e0b3941b2e6..f3d047f0a484dc9f1eb09f74d2d56f1755885d9e 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2772,15 +2772,15 @@ void Isolate::CheckDetachedContextsAfterGC() {
}
-bool StackLimitCheck::JsHasOverflowed() const {
+bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
StackGuard* stack_guard = isolate_->stack_guard();
#ifdef USE_SIMULATOR
// The simulator uses a separate JS stack.
Address jssp_address = Simulator::current(isolate_)->get_sp();
uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address);
- if (jssp < stack_guard->real_jslimit()) return true;
+ if (jssp - gap < stack_guard->real_jslimit()) return true;
#endif // USE_SIMULATOR
- return GetCurrentStackPosition() < stack_guard->real_climit();
+ return GetCurrentStackPosition() - gap < stack_guard->real_climit();
}
« no previous file with comments | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698