| Index: src/v8threads.cc
 | 
| ===================================================================
 | 
| --- src/v8threads.cc	(revision 2982)
 | 
| +++ src/v8threads.cc	(working copy)
 | 
| @@ -60,6 +60,10 @@
 | 
|      // get the saved state for this thread and restore it.
 | 
|      if (internal::ThreadManager::RestoreThread()) {
 | 
|        top_level_ = false;
 | 
| +    } else {
 | 
| +      internal::ExecutionAccess access;
 | 
| +      internal::StackGuard::ClearThread(access);
 | 
| +      internal::StackGuard::InitThread(access);
 | 
|      }
 | 
|    }
 | 
|    ASSERT(internal::ThreadManager::IsLockedByCurrentThread());
 | 
| @@ -141,6 +145,8 @@
 | 
|    ThreadState* state =
 | 
|        reinterpret_cast<ThreadState*>(Thread::GetThreadLocal(thread_state_key));
 | 
|    if (state == NULL) {
 | 
| +    // This is a new thread.
 | 
| +    StackGuard::InitThread(access);
 | 
|      return false;
 | 
|    }
 | 
|    char* from = state->data();
 | 
| 
 |