| Index: src/execution.cc
|
| ===================================================================
|
| --- src/execution.cc (revision 2758)
|
| +++ src/execution.cc (working copy)
|
| @@ -234,8 +234,9 @@
|
| (thread_local_.climit_ == kInterruptLimit &&
|
| thread_local_.interrupt_flags_ != 0));
|
|
|
| - thread_local_.initial_jslimit_ = thread_local_.jslimit_ =
|
| - GENERATED_CODE_STACK_LIMIT(kLimitSize);
|
| + uintptr_t limit = GENERATED_CODE_STACK_LIMIT(kLimitSize);
|
| + thread_local_.initial_jslimit_ = thread_local_.jslimit_ = limit;
|
| + Heap::SetStackLimit(limit);
|
| // NOTE: The check for overflow is not safe as there is no guarantee that
|
| // the running thread has its stack in all memory up to address 0x00000000.
|
| thread_local_.initial_climit_ = thread_local_.climit_ =
|
| @@ -283,6 +284,7 @@
|
| // leave them alone.
|
| if (thread_local_.jslimit_ == thread_local_.initial_jslimit_) {
|
| thread_local_.jslimit_ = limit;
|
| + Heap::SetStackLimit(limit);
|
| }
|
| if (thread_local_.climit_ == thread_local_.initial_climit_) {
|
| thread_local_.climit_ = limit;
|
| @@ -397,6 +399,7 @@
|
| char* StackGuard::RestoreStackGuard(char* from) {
|
| ExecutionAccess access;
|
| memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal));
|
| + Heap::SetStackLimit(thread_local_.jslimit_);
|
| return from + sizeof(ThreadLocal);
|
| }
|
|
|
|
|