Chromium Code Reviews| Index: src/execution.cc |
| diff --git a/src/execution.cc b/src/execution.cc |
| index eb26438fe87af6a1d264b3b9ad32ad0efab6e8e8..b0a9b09b5e9af1b00d52b148140d56468bc11125 100644 |
| --- a/src/execution.cc |
| +++ b/src/execution.cc |
| @@ -457,11 +457,14 @@ void StackGuard::ClearThread(const ExecutionAccess& lock) { |
| void StackGuard::InitThread(const ExecutionAccess& lock) { |
| if (thread_local_.Initialize()) isolate_->heap()->SetStackLimits(); |
| - uintptr_t stored_limit = |
| - Isolate::CurrentPerIsolateThreadData()->stack_limit(); |
| - // You should hold the ExecutionAccess lock when you call this. |
| - if (stored_limit != 0) { |
| - StackGuard::SetStackLimit(stored_limit); |
| + Isolate::PerIsolateThreadData* per_thread = |
| + isolate_->FindOrAllocatePerThreadDataForThisThread(); |
|
Vitaly Repeshko
2011/04/15 00:29:39
Are you sure you need "OrAllocate" here?
Dmitry Lomov
2011/04/19 01:50:47
It is actually the if below that was bogus - done
|
| + if (per_thread != NULL) { |
| + uintptr_t stored_limit = per_thread->stack_limit(); |
| + // You should hold the ExecutionAccess lock when you call this. |
| + if (stored_limit != 0) { |
| + StackGuard::SetStackLimit(stored_limit); |
| + } |
| } |
| } |