OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 #ifndef VM_SERVICE_EVENT_H_ | 5 #ifndef VM_SERVICE_EVENT_H_ |
6 #define VM_SERVICE_EVENT_H_ | 6 #define VM_SERVICE_EVENT_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class ServiceEvent { | 22 class ServiceEvent { |
23 public: | 23 public: |
24 enum EventKind { | 24 enum EventKind { |
25 kVMUpdate, // VM identity information has changed | 25 kVMUpdate, // VM identity information has changed |
26 | 26 |
27 kIsolateStart, // New isolate has started | 27 kIsolateStart, // New isolate has started |
28 kIsolateRunnable, // Isolate is ready to run | 28 kIsolateRunnable, // Isolate is ready to run |
29 kIsolateExit, // Isolate has exited | 29 kIsolateExit, // Isolate has exited |
30 kIsolateUpdate, // Isolate identity information has changed | 30 kIsolateUpdate, // Isolate identity information has changed |
31 kIsolateReload, // Result of a reload request | 31 kIsolateReload, // Result of a reload request |
| 32 kIsolateSpawn, // Result of an isolate spawn request |
32 kServiceExtensionAdded, // A service extension was registered | 33 kServiceExtensionAdded, // A service extension was registered |
33 | 34 |
34 kPauseStart, // --pause-isolates-on-start | 35 kPauseStart, // --pause-isolates-on-start |
35 kPauseExit, // --pause-isolates-on-exit | 36 kPauseExit, // --pause-isolates-on-exit |
36 kPauseBreakpoint, | 37 kPauseBreakpoint, |
37 kPauseInterrupted, | 38 kPauseInterrupted, |
38 kPauseException, | 39 kPauseException, |
39 kNone, // isolate has not been made runnable yet. | 40 kNone, // isolate has not been made runnable yet. |
40 kResume, | 41 kResume, |
41 kBreakpointAdded, | 42 kBreakpointAdded, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 152 |
152 const Error* reload_error() const { | 153 const Error* reload_error() const { |
153 ASSERT(kind_ == kIsolateReload); | 154 ASSERT(kind_ == kIsolateReload); |
154 return reload_error_; | 155 return reload_error_; |
155 } | 156 } |
156 void set_reload_error(const Error* error) { | 157 void set_reload_error(const Error* error) { |
157 ASSERT(kind_ == kIsolateReload); | 158 ASSERT(kind_ == kIsolateReload); |
158 reload_error_ = error; | 159 reload_error_ = error; |
159 } | 160 } |
160 | 161 |
| 162 const String* spawn_token() const { |
| 163 ASSERT(kind_ == kIsolateSpawn); |
| 164 return spawn_token_; |
| 165 } |
| 166 void set_spawn_token(const String* error) { |
| 167 ASSERT(kind_ == kIsolateSpawn); |
| 168 spawn_token_ = error; |
| 169 } |
| 170 |
| 171 const String* spawn_error() const { |
| 172 ASSERT(kind_ == kIsolateSpawn); |
| 173 return spawn_error_; |
| 174 } |
| 175 void set_spawn_error(const String* error) { |
| 176 ASSERT(kind_ == kIsolateSpawn); |
| 177 spawn_error_ = error; |
| 178 } |
| 179 |
161 bool at_async_jump() const { | 180 bool at_async_jump() const { |
162 return at_async_jump_; | 181 return at_async_jump_; |
163 } | 182 } |
164 void set_at_async_jump(bool value) { | 183 void set_at_async_jump(bool value) { |
165 at_async_jump_ = value; | 184 at_async_jump_ = value; |
166 } | 185 } |
167 | 186 |
168 const Object* inspectee() const { | 187 const Object* inspectee() const { |
169 return inspectee_; | 188 return inspectee_; |
170 } | 189 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 Isolate* isolate_; | 244 Isolate* isolate_; |
226 EventKind kind_; | 245 EventKind kind_; |
227 const char* embedder_kind_; | 246 const char* embedder_kind_; |
228 const char* embedder_stream_id_; | 247 const char* embedder_stream_id_; |
229 Breakpoint* breakpoint_; | 248 Breakpoint* breakpoint_; |
230 ActivationFrame* top_frame_; | 249 ActivationFrame* top_frame_; |
231 const TimelineEventBlock* timeline_event_block_; | 250 const TimelineEventBlock* timeline_event_block_; |
232 const String* extension_rpc_; | 251 const String* extension_rpc_; |
233 const Object* exception_; | 252 const Object* exception_; |
234 const Error* reload_error_; | 253 const Error* reload_error_; |
| 254 const String* spawn_token_; |
| 255 const String* spawn_error_; |
235 bool at_async_jump_; | 256 bool at_async_jump_; |
236 const Object* inspectee_; | 257 const Object* inspectee_; |
237 const Heap::GCStats* gc_stats_; | 258 const Heap::GCStats* gc_stats_; |
238 const uint8_t* bytes_; | 259 const uint8_t* bytes_; |
239 intptr_t bytes_length_; | 260 intptr_t bytes_length_; |
240 LogRecord log_record_; | 261 LogRecord log_record_; |
241 ExtensionEvent extension_event_; | 262 ExtensionEvent extension_event_; |
242 int64_t timestamp_; | 263 int64_t timestamp_; |
243 }; | 264 }; |
244 | 265 |
245 } // namespace dart | 266 } // namespace dart |
246 | 267 |
247 #endif // VM_SERVICE_EVENT_H_ | 268 #endif // VM_SERVICE_EVENT_H_ |
OLD | NEW |