OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "api.h" | 7 #include "api.h" |
8 #include "bootstrapper.h" | 8 #include "bootstrapper.h" |
9 #include "debug.h" | 9 #include "debug.h" |
10 #include "execution.h" | 10 #include "execution.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 char* from = state->data(); | 138 char* from = state->data(); |
139 from = isolate_->handle_scope_implementer()->RestoreThread(from); | 139 from = isolate_->handle_scope_implementer()->RestoreThread(from); |
140 from = isolate_->RestoreThread(from); | 140 from = isolate_->RestoreThread(from); |
141 from = Relocatable::RestoreState(isolate_, from); | 141 from = Relocatable::RestoreState(isolate_, from); |
142 from = isolate_->debug()->RestoreDebug(from); | 142 from = isolate_->debug()->RestoreDebug(from); |
143 from = isolate_->stack_guard()->RestoreStackGuard(from); | 143 from = isolate_->stack_guard()->RestoreStackGuard(from); |
144 from = isolate_->regexp_stack()->RestoreStack(from); | 144 from = isolate_->regexp_stack()->RestoreStack(from); |
145 from = isolate_->bootstrapper()->RestoreState(from); | 145 from = isolate_->bootstrapper()->RestoreState(from); |
146 per_thread->set_thread_state(NULL); | 146 per_thread->set_thread_state(NULL); |
147 if (state->terminate_on_restore()) { | 147 if (state->terminate_on_restore()) { |
148 isolate_->stack_guard()->TerminateExecution(); | 148 isolate_->stack_guard()->RequestTerminateExecution(); |
149 state->set_terminate_on_restore(false); | 149 state->set_terminate_on_restore(false); |
150 } | 150 } |
151 state->set_id(ThreadId::Invalid()); | 151 state->set_id(ThreadId::Invalid()); |
152 state->Unlink(); | 152 state->Unlink(); |
153 state->LinkInto(ThreadState::FREE_LIST); | 153 state->LinkInto(ThreadState::FREE_LIST); |
154 return true; | 154 return true; |
155 } | 155 } |
156 | 156 |
157 | 157 |
158 void ThreadManager::Lock() { | 158 void ThreadManager::Lock() { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 state = state->Next()) { | 358 state = state->Next()) { |
359 if (thread_id.Equals(state->id())) { | 359 if (thread_id.Equals(state->id())) { |
360 state->set_terminate_on_restore(true); | 360 state->set_terminate_on_restore(true); |
361 } | 361 } |
362 } | 362 } |
363 } | 363 } |
364 | 364 |
365 | 365 |
366 } // namespace internal | 366 } // namespace internal |
367 } // namespace v8 | 367 } // namespace v8 |
OLD | NEW |