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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", | 1802 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", |
1803 static_cast<int64_t>(origin_id())); | 1803 static_cast<int64_t>(origin_id())); |
1804 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; | 1804 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; |
1805 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); | 1805 jsobj.AddPropertyTimeMillis("startTime", start_time_millis); |
1806 { | 1806 { |
1807 JSONObject jsheap(&jsobj, "_heaps"); | 1807 JSONObject jsheap(&jsobj, "_heaps"); |
1808 heap()->PrintToJSONObject(Heap::kNew, &jsheap); | 1808 heap()->PrintToJSONObject(Heap::kNew, &jsheap); |
1809 heap()->PrintToJSONObject(Heap::kOld, &jsheap); | 1809 heap()->PrintToJSONObject(Heap::kOld, &jsheap); |
1810 } | 1810 } |
1811 | 1811 |
| 1812 jsobj.AddProperty("runnable", is_runnable()); |
1812 jsobj.AddProperty("livePorts", message_handler()->live_ports()); | 1813 jsobj.AddProperty("livePorts", message_handler()->live_ports()); |
1813 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit()); | 1814 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit()); |
1814 | 1815 |
1815 if (message_handler()->paused_on_start()) { | 1816 if (message_handler()->paused_on_start()) { |
1816 ASSERT(debugger()->PauseEvent() == NULL); | 1817 ASSERT(debugger()->PauseEvent() == NULL); |
1817 ServiceEvent pause_event(this, ServiceEvent::kPauseStart); | 1818 ServiceEvent pause_event(this, ServiceEvent::kPauseStart); |
1818 jsobj.AddProperty("pauseEvent", &pause_event); | 1819 jsobj.AddProperty("pauseEvent", &pause_event); |
1819 } else if (message_handler()->paused_on_exit()) { | 1820 } else if (message_handler()->paused_on_exit()) { |
1820 ASSERT(debugger()->PauseEvent() == NULL); | 1821 ASSERT(debugger()->PauseEvent() == NULL); |
1821 ServiceEvent pause_event(this, ServiceEvent::kPauseExit); | 1822 ServiceEvent pause_event(this, ServiceEvent::kPauseExit); |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 void IsolateSpawnState::DecrementSpawnCount() { | 2554 void IsolateSpawnState::DecrementSpawnCount() { |
2554 ASSERT(spawn_count_monitor_ != NULL); | 2555 ASSERT(spawn_count_monitor_ != NULL); |
2555 ASSERT(spawn_count_ != NULL); | 2556 ASSERT(spawn_count_ != NULL); |
2556 MonitorLocker ml(spawn_count_monitor_); | 2557 MonitorLocker ml(spawn_count_monitor_); |
2557 ASSERT(*spawn_count_ > 0); | 2558 ASSERT(*spawn_count_ > 0); |
2558 *spawn_count_ = *spawn_count_ - 1; | 2559 *spawn_count_ = *spawn_count_ - 1; |
2559 ml.Notify(); | 2560 ml.Notify(); |
2560 } | 2561 } |
2561 | 2562 |
2562 } // namespace dart | 2563 } // namespace dart |
OLD | NEW |