Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: runtime/vm/isolate.cc

Issue 1681903002: Add 'runnable' to Isolate service response (Closed) Base URL: git@github.com:dart-lang/sdk.git@stable
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/service/get_version_rpc_test.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/get_version_rpc_test.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698