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

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

Issue 340443006: Add support for asynchronous event notification to the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 // inlined frames. 955 // inlined frames.
956 jsobj.AddProperty("depth", (intptr_t)0); 956 jsobj.AddProperty("depth", (intptr_t)0);
957 } 957 }
958 jsobj.AddProperty("livePorts", message_handler()->live_ports()); 958 jsobj.AddProperty("livePorts", message_handler()->live_ports());
959 jsobj.AddProperty("controlPorts", message_handler()->control_ports()); 959 jsobj.AddProperty("controlPorts", message_handler()->control_ports());
960 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit()); 960 jsobj.AddProperty("pauseOnExit", message_handler()->pause_on_exit());
961 961
962 // TODO(turnidge): Make the debugger support paused_on_start/exit. 962 // TODO(turnidge): Make the debugger support paused_on_start/exit.
963 if (message_handler()->paused_on_start()) { 963 if (message_handler()->paused_on_start()) {
964 ASSERT(debugger()->PauseEvent() == NULL); 964 ASSERT(debugger()->PauseEvent() == NULL);
965 DebuggerEvent pauseEvent(DebuggerEvent::kIsolateCreated); 965 DebuggerEvent pauseEvent(this, DebuggerEvent::kIsolateCreated);
966 jsobj.AddProperty("pauseEvent", &pauseEvent); 966 jsobj.AddProperty("pauseEvent", &pauseEvent);
967 } else if (message_handler()->paused_on_exit()) { 967 } else if (message_handler()->paused_on_exit()) {
968 ASSERT(debugger()->PauseEvent() == NULL); 968 ASSERT(debugger()->PauseEvent() == NULL);
969 DebuggerEvent pauseEvent(DebuggerEvent::kIsolateShutdown); 969 DebuggerEvent pauseEvent(this, DebuggerEvent::kIsolateShutdown);
970 jsobj.AddProperty("pauseEvent", &pauseEvent); 970 jsobj.AddProperty("pauseEvent", &pauseEvent);
971 } else if (debugger()->PauseEvent() != NULL) { 971 } else if (debugger()->PauseEvent() != NULL) {
972 jsobj.AddProperty("pauseEvent", debugger()->PauseEvent()); 972 jsobj.AddProperty("pauseEvent", debugger()->PauseEvent());
973 } 973 }
974 974
975 const Library& lib = 975 const Library& lib =
976 Library::Handle(object_store()->root_library()); 976 Library::Handle(object_store()->root_library());
977 jsobj.AddProperty("rootLib", lib); 977 jsobj.AddProperty("rootLib", lib);
978 978
979 timer_list().PrintTimersToJSONProperty(&jsobj); 979 timer_list().PrintTimersToJSONProperty(&jsobj);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 return func.raw(); 1236 return func.raw();
1237 } 1237 }
1238 1238
1239 1239
1240 void IsolateSpawnState::Cleanup() { 1240 void IsolateSpawnState::Cleanup() {
1241 SwitchIsolateScope switch_scope(isolate()); 1241 SwitchIsolateScope switch_scope(isolate());
1242 Dart::ShutdownIsolate(); 1242 Dart::ShutdownIsolate();
1243 } 1243 }
1244 1244
1245 } // namespace dart 1245 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698