Index: src/execution.cc |
diff --git a/src/execution.cc b/src/execution.cc |
index d2dd41a12c6598ca170d80da314267382780e86e..c2033777f283f99002d58e33984b1738ff942b8e 100644 |
--- a/src/execution.cc |
+++ b/src/execution.cc |
@@ -341,14 +341,6 @@ MaybeHandle<Object> Execution::TryGetConstructorDelegate( |
} |
-void StackGuard::EnableInterrupts() { |
- ExecutionAccess access(isolate_); |
- if (has_pending_interrupts(access)) { |
- set_interrupt_limits(access); |
- } |
-} |
- |
- |
void StackGuard::SetStackLimit(uintptr_t limit) { |
ExecutionAccess access(isolate_); |
// If the current limits are special (e.g. due to a pending interrupt) then |
@@ -365,6 +357,27 @@ void StackGuard::SetStackLimit(uintptr_t limit) { |
} |
+void StackGuard::AdjustStackLimitForSimulator() { |
+ ExecutionAccess access(isolate_); |
+ uintptr_t climit = thread_local_.real_climit_; |
+ // If the current limits are special (e.g. due to a pending interrupt) then |
+ // leave them alone. |
+ uintptr_t jslimit = SimulatorStack::JsLimitFromCLimit(isolate_, climit); |
+ if (thread_local_.jslimit() == thread_local_.real_jslimit_) { |
+ thread_local_.set_jslimit(jslimit); |
+ isolate_->heap()->SetStackLimits(); |
+ } |
+} |
+ |
+ |
+void StackGuard::EnableInterrupts() { |
+ ExecutionAccess access(isolate_); |
+ if (has_pending_interrupts(access)) { |
+ set_interrupt_limits(access); |
+ } |
+} |
+ |
+ |
void StackGuard::DisableInterrupts() { |
ExecutionAccess access(isolate_); |
reset_limits(access); |