| Index: src/execution.cc
|
| diff --git a/src/execution.cc b/src/execution.cc
|
| index 05a69acfdedcc2099500060d84f2f7ad41b7098b..922211a3161dccefd6c9f335e921c4eed3f5dd25 100644
|
| --- a/src/execution.cc
|
| +++ b/src/execution.cc
|
| @@ -60,6 +60,10 @@ MUST_USE_RESULT MaybeHandle<Object> Invoke(
|
| Handle<Object> receiver, int argc, Handle<Object> args[],
|
| Handle<Object> new_target, Execution::MessageHandling message_handling) {
|
| DCHECK(!receiver->IsJSGlobalObject());
|
| +#if DEBUG
|
| + // Assume that any JS call can allocate.
|
| + if (FLAG_zap_cpp_pointers) ZapHeapPointersInCppFrames(isolate);
|
| +#endif
|
|
|
| #ifdef USE_SIMULATOR
|
| // Simulators use separate stacks for C++ and JS. JS stack overflow checks
|
| @@ -418,8 +422,12 @@ bool StackGuard::ThreadLocal::Initialize(Isolate* isolate) {
|
| bool should_set_stack_limits = false;
|
| if (real_climit_ == kIllegalLimit) {
|
| const uintptr_t kLimitSize = FLAG_stack_size * KB;
|
| - DCHECK(GetCurrentStackPosition() > kLimitSize);
|
| - uintptr_t limit = GetCurrentStackPosition() - kLimitSize;
|
| + uintptr_t current_stack_position = GetCurrentStackPosition();
|
| +#if DEBUG
|
| + DCHECK(current_stack_position > kLimitSize);
|
| + stack_base_position_ = current_stack_position;
|
| +#endif
|
| + uintptr_t limit = current_stack_position - kLimitSize;
|
| real_jslimit_ = SimulatorStack::JsLimitFromCLimit(isolate, limit);
|
| set_jslimit(SimulatorStack::JsLimitFromCLimit(isolate, limit));
|
| real_climit_ = limit;
|
|
|