| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 library_tag_handler_(NULL), | 794 library_tag_handler_(NULL), |
| 795 api_state_(NULL), | 795 api_state_(NULL), |
| 796 debugger_(NULL), | 796 debugger_(NULL), |
| 797 resume_request_(false), | 797 resume_request_(false), |
| 798 last_resume_timestamp_(OS::GetCurrentTimeMillis()), | 798 last_resume_timestamp_(OS::GetCurrentTimeMillis()), |
| 799 has_compiled_code_(false), | 799 has_compiled_code_(false), |
| 800 flags_(), | 800 flags_(), |
| 801 random_(), | 801 random_(), |
| 802 simulator_(NULL), | 802 simulator_(NULL), |
| 803 mutex_(new Mutex()), | 803 mutex_(new Mutex()), |
| 804 symbols_mutex_(new Mutex()), |
| 804 saved_stack_limit_(0), | 805 saved_stack_limit_(0), |
| 805 deferred_interrupts_mask_(0), | 806 deferred_interrupts_mask_(0), |
| 806 deferred_interrupts_(0), | 807 deferred_interrupts_(0), |
| 807 stack_overflow_flags_(0), | 808 stack_overflow_flags_(0), |
| 808 stack_overflow_count_(0), | 809 stack_overflow_count_(0), |
| 809 message_handler_(NULL), | 810 message_handler_(NULL), |
| 810 spawn_state_(NULL), | 811 spawn_state_(NULL), |
| 811 is_runnable_(false), | 812 is_runnable_(false), |
| 812 gc_prologue_callback_(NULL), | 813 gc_prologue_callback_(NULL), |
| 813 gc_epilogue_callback_(NULL), | 814 gc_epilogue_callback_(NULL), |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 delete object_store_; | 857 delete object_store_; |
| 857 delete api_state_; | 858 delete api_state_; |
| 858 if (FLAG_support_debugger) { | 859 if (FLAG_support_debugger) { |
| 859 delete debugger_; | 860 delete debugger_; |
| 860 } | 861 } |
| 861 #if defined(USING_SIMULATOR) | 862 #if defined(USING_SIMULATOR) |
| 862 delete simulator_; | 863 delete simulator_; |
| 863 #endif | 864 #endif |
| 864 delete mutex_; | 865 delete mutex_; |
| 865 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. | 866 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. |
| 867 delete symbols_mutex_; |
| 868 symbols_mutex_ = NULL; |
| 866 delete message_handler_; | 869 delete message_handler_; |
| 867 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. | 870 message_handler_ = NULL; // Fail fast if we send messages to a dead isolate. |
| 868 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. | 871 ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted. |
| 869 delete spawn_state_; | 872 delete spawn_state_; |
| 870 if (FLAG_support_service) { | 873 if (FLAG_support_service) { |
| 871 delete object_id_ring_; | 874 delete object_id_ring_; |
| 872 } | 875 } |
| 873 object_id_ring_ = NULL; | 876 object_id_ring_ = NULL; |
| 874 delete pause_loop_monitor_; | 877 delete pause_loop_monitor_; |
| 875 pause_loop_monitor_ = NULL; | 878 pause_loop_monitor_ = NULL; |
| (...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2818 void IsolateSpawnState::DecrementSpawnCount() { | 2821 void IsolateSpawnState::DecrementSpawnCount() { |
| 2819 ASSERT(spawn_count_monitor_ != NULL); | 2822 ASSERT(spawn_count_monitor_ != NULL); |
| 2820 ASSERT(spawn_count_ != NULL); | 2823 ASSERT(spawn_count_ != NULL); |
| 2821 MonitorLocker ml(spawn_count_monitor_); | 2824 MonitorLocker ml(spawn_count_monitor_); |
| 2822 ASSERT(*spawn_count_ > 0); | 2825 ASSERT(*spawn_count_ > 0); |
| 2823 *spawn_count_ = *spawn_count_ - 1; | 2826 *spawn_count_ = *spawn_count_ - 1; |
| 2824 ml.Notify(); | 2827 ml.Notify(); |
| 2825 } | 2828 } |
| 2826 | 2829 |
| 2827 } // namespace dart | 2830 } // namespace dart |
| OLD | NEW |