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

Side by Side Diff: runtime/vm/service_event.h

Issue 1166433008: 2nd attempt at adding streamListen/streamCancel to the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix context objects Created 5 years, 6 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/vm/service/vmservice.dart ('k') | runtime/vm/service_event.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) 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/debugger.h" 8 #include "vm/debugger.h"
9 9
10 class DebuggerEvent; 10 class DebuggerEvent;
11 11
12 namespace dart { 12 namespace dart {
13 13
14 class ServiceEvent { 14 class ServiceEvent {
15 public: 15 public:
16 enum EventType { 16 enum EventType {
17 kIsolateStart, // New isolate has started 17 kIsolateStart, // New isolate has started
18 kIsolateExit, // Isolate has exited 18 kIsolateExit, // Isolate has exited
19 kIsolateUpdate, // Isolate identity information has changed 19 kIsolateUpdate, // Isolate identity information has changed
20 20
21 kPauseStart, // --pause-isolates-on-start 21 kPauseStart, // --pause-isolates-on-start
22 kPauseExit, // --pause-isolates-on-exit 22 kPauseExit, // --pause-isolates-on-exit
23 kPauseBreakpoint, 23 kPauseBreakpoint,
24 kPauseInterrupted, 24 kPauseInterrupted,
25 kPauseException, 25 kPauseException,
26 kResume, 26 kResume,
27
28 kBreakpointAdded, 27 kBreakpointAdded,
29 kBreakpointResolved, 28 kBreakpointResolved,
30 kBreakpointRemoved, 29 kBreakpointRemoved,
30 kInspect,
31 31
32 kGC, 32 kGC,
33 kInspect,
34 33
35 kIllegal, 34 kIllegal,
36 }; 35 };
37 36
38 ServiceEvent(Isolate* isolate, EventType event_type) 37 ServiceEvent(Isolate* isolate, EventType event_type)
39 : isolate_(isolate), 38 : isolate_(isolate),
40 type_(event_type), 39 type_(event_type),
41 breakpoint_(NULL), 40 breakpoint_(NULL),
42 top_frame_(NULL), 41 top_frame_(NULL),
43 exception_(NULL), 42 exception_(NULL),
44 inspectee_(NULL), 43 inspectee_(NULL),
45 gc_stats_(NULL) {} 44 gc_stats_(NULL) {}
46 45
47 explicit ServiceEvent(const DebuggerEvent* debugger_event); 46 explicit ServiceEvent(const DebuggerEvent* debugger_event);
48 47
49 Isolate* isolate() const { return isolate_; } 48 Isolate* isolate() const { return isolate_; }
50 49
51 EventType type() const { return type_; } 50 EventType type() const { return type_; }
52 51
52 const char* stream_id() const;
53
53 Breakpoint* breakpoint() const { 54 Breakpoint* breakpoint() const {
54 return breakpoint_; 55 return breakpoint_;
55 } 56 }
56 void set_breakpoint(Breakpoint* bpt) { 57 void set_breakpoint(Breakpoint* bpt) {
57 ASSERT(type() == kPauseBreakpoint || 58 ASSERT(type() == kPauseBreakpoint ||
58 type() == kBreakpointAdded || 59 type() == kBreakpointAdded ||
59 type() == kBreakpointResolved || 60 type() == kBreakpointResolved ||
60 type() == kBreakpointRemoved); 61 type() == kBreakpointRemoved);
61 breakpoint_ = bpt; 62 breakpoint_ = bpt;
62 } 63 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 Breakpoint* breakpoint_; 107 Breakpoint* breakpoint_;
107 ActivationFrame* top_frame_; 108 ActivationFrame* top_frame_;
108 const Object* exception_; 109 const Object* exception_;
109 const Object* inspectee_; 110 const Object* inspectee_;
110 const Heap::GCStats* gc_stats_; 111 const Heap::GCStats* gc_stats_;
111 }; 112 };
112 113
113 } // namespace dart 114 } // namespace dart
114 115
115 #endif // VM_SERVICE_EVENT_H_ 116 #endif // VM_SERVICE_EVENT_H_
OLDNEW
« no previous file with comments | « runtime/vm/service/vmservice.dart ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698