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 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1836 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", | 1836 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", |
1837 static_cast<int64_t>(origin_id())); | 1837 static_cast<int64_t>(origin_id())); |
1838 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; | 1838 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; |
1839 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); | 1839 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); |
1840 { | 1840 { |
1841 JSONObject jsheap(&jsobj, "_heaps"); | 1841 JSONObject jsheap(&jsobj, "_heaps"); |
1842 heap()->PrintToJSONObject(Heap::kNew, &jsheap); | 1842 heap()->PrintToJSONObject(Heap::kNew, &jsheap); |
1843 heap()->PrintToJSONObject(Heap::kOld, &jsheap); | 1843 heap()->PrintToJSONObject(Heap::kOld, &jsheap); |
1844 } | 1844 } |
1845 | 1845 |
| 1846 jsobj.AddProperty("runnable", is_runnable()); |
1846 jsobj.AddProperty("livePorts", message_handler()->live_ports()); | 1847 jsobj.AddProperty("livePorts", message_handler()->live_ports()); |
1847 jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit()); | 1848 jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit()); |
1848 | 1849 |
1849 if (message_handler()->is_paused_on_start()) { | 1850 if (message_handler()->is_paused_on_start()) { |
1850 ASSERT(debugger()->PauseEvent() == NULL); | 1851 ASSERT(debugger()->PauseEvent() == NULL); |
1851 ServiceEvent pause_event(this, ServiceEvent::kPauseStart); | 1852 ServiceEvent pause_event(this, ServiceEvent::kPauseStart); |
1852 jsobj.AddProperty("pauseEvent", &pause_event); | 1853 jsobj.AddProperty("pauseEvent", &pause_event); |
1853 } else if (message_handler()->is_paused_on_exit()) { | 1854 } else if (message_handler()->is_paused_on_exit()) { |
1854 ASSERT(debugger()->PauseEvent() == NULL); | 1855 ASSERT(debugger()->PauseEvent() == NULL); |
1855 ServiceEvent pause_event(this, ServiceEvent::kPauseExit); | 1856 ServiceEvent pause_event(this, ServiceEvent::kPauseExit); |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2667 void IsolateSpawnState::DecrementSpawnCount() { | 2668 void IsolateSpawnState::DecrementSpawnCount() { |
2668 ASSERT(spawn_count_monitor_ != NULL); | 2669 ASSERT(spawn_count_monitor_ != NULL); |
2669 ASSERT(spawn_count_ != NULL); | 2670 ASSERT(spawn_count_ != NULL); |
2670 MonitorLocker ml(spawn_count_monitor_); | 2671 MonitorLocker ml(spawn_count_monitor_); |
2671 ASSERT(*spawn_count_ > 0); | 2672 ASSERT(*spawn_count_ > 0); |
2672 *spawn_count_ = *spawn_count_ - 1; | 2673 *spawn_count_ = *spawn_count_ - 1; |
2673 ml.Notify(); | 2674 ml.Notify(); |
2674 } | 2675 } |
2675 | 2676 |
2676 } // namespace dart | 2677 } // namespace dart |
OLD | NEW |