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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/execution.h" | 10 #include "src/execution.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 to = isolate_->debug()->ArchiveDebug(to); | 300 to = isolate_->debug()->ArchiveDebug(to); |
301 to = isolate_->stack_guard()->ArchiveStackGuard(to); | 301 to = isolate_->stack_guard()->ArchiveStackGuard(to); |
302 to = isolate_->regexp_stack()->ArchiveStack(to); | 302 to = isolate_->regexp_stack()->ArchiveStack(to); |
303 to = isolate_->bootstrapper()->ArchiveState(to); | 303 to = isolate_->bootstrapper()->ArchiveState(to); |
304 lazily_archived_thread_ = ThreadId::Invalid(); | 304 lazily_archived_thread_ = ThreadId::Invalid(); |
305 lazily_archived_thread_state_ = NULL; | 305 lazily_archived_thread_state_ = NULL; |
306 } | 306 } |
307 | 307 |
308 | 308 |
309 void ThreadManager::FreeThreadResources() { | 309 void ThreadManager::FreeThreadResources() { |
| 310 DCHECK(!isolate_->has_pending_exception()); |
| 311 DCHECK(!isolate_->external_caught_exception()); |
| 312 DCHECK(isolate_->try_catch_handler() == NULL); |
310 isolate_->handle_scope_implementer()->FreeThreadResources(); | 313 isolate_->handle_scope_implementer()->FreeThreadResources(); |
311 isolate_->FreeThreadResources(); | 314 isolate_->FreeThreadResources(); |
312 isolate_->debug()->FreeThreadResources(); | 315 isolate_->debug()->FreeThreadResources(); |
313 isolate_->stack_guard()->FreeThreadResources(); | 316 isolate_->stack_guard()->FreeThreadResources(); |
314 isolate_->regexp_stack()->FreeThreadResources(); | 317 isolate_->regexp_stack()->FreeThreadResources(); |
315 isolate_->bootstrapper()->FreeThreadResources(); | 318 isolate_->bootstrapper()->FreeThreadResources(); |
316 } | 319 } |
317 | 320 |
318 | 321 |
319 bool ThreadManager::IsArchived() { | 322 bool ThreadManager::IsArchived() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 state = state->Next()) { | 361 state = state->Next()) { |
359 if (thread_id.Equals(state->id())) { | 362 if (thread_id.Equals(state->id())) { |
360 state->set_terminate_on_restore(true); | 363 state->set_terminate_on_restore(true); |
361 } | 364 } |
362 } | 365 } |
363 } | 366 } |
364 | 367 |
365 | 368 |
366 } // namespace internal | 369 } // namespace internal |
367 } // namespace v8 | 370 } // namespace v8 |
OLD | NEW |