| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/thread.h" | 5 #include "vm/thread.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_state.h" | 7 #include "vm/dart_api_state.h" |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/lockers.h" | 10 #include "vm/lockers.h" |
| 11 #include "vm/log.h" | 11 #include "vm/log.h" |
| 12 #include "vm/message_handler.h" | 12 #include "vm/message_handler.h" |
| 13 #include "vm/native_entry.h" | 13 #include "vm/native_entry.h" |
| 14 #include "vm/object.h" | 14 #include "vm/object.h" |
| 15 #include "vm/os_thread.h" | 15 #include "vm/os_thread.h" |
| 16 #include "vm/profiler.h" | 16 #include "vm/profiler.h" |
| 17 #include "vm/runtime_entry.h" | 17 #include "vm/runtime_entry.h" |
| 18 #include "vm/stub_code.h" | 18 #include "vm/stub_code.h" |
| 19 #include "vm/symbols.h" | 19 #include "vm/symbols.h" |
| 20 #include "vm/thread_interrupter.h" | 20 #include "vm/thread_interrupter.h" |
| 21 #include "vm/thread_registry.h" | 21 #include "vm/thread_registry.h" |
| 22 | 22 |
| 23 namespace dart { | 23 namespace dart { |
| 24 | 24 |
| 25 | 25 |
| 26 DECLARE_FLAG(bool, trace_isolates); | |
| 27 DECLARE_FLAG(bool, trace_service); | 26 DECLARE_FLAG(bool, trace_service); |
| 28 DECLARE_FLAG(bool, trace_service_verbose); | 27 DECLARE_FLAG(bool, trace_service_verbose); |
| 29 | 28 |
| 30 | 29 |
| 31 Thread::~Thread() { | 30 Thread::~Thread() { |
| 32 // We should cleanly exit any isolate before destruction. | 31 // We should cleanly exit any isolate before destruction. |
| 33 ASSERT(isolate_ == NULL); | 32 ASSERT(isolate_ == NULL); |
| 34 // There should be no top api scopes at this point. | 33 // There should be no top api scopes at this point. |
| 35 ASSERT(api_top_scope() == NULL); | 34 ASSERT(api_top_scope() == NULL); |
| 36 // Delete the resusable api scope if there is one. | 35 // Delete the resusable api scope if there is one. |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 710 |
| 712 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() { | 711 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() { |
| 713 if (thread() != NULL) { | 712 if (thread() != NULL) { |
| 714 OSThread* os_thread = thread()->os_thread(); | 713 OSThread* os_thread = thread()->os_thread(); |
| 715 ASSERT(os_thread != NULL); | 714 ASSERT(os_thread != NULL); |
| 716 os_thread->EnableThreadInterrupts(); | 715 os_thread->EnableThreadInterrupts(); |
| 717 } | 716 } |
| 718 } | 717 } |
| 719 | 718 |
| 720 } // namespace dart | 719 } // namespace dart |
| OLD | NEW |