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

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

Issue 1093043004: Do not JSON encode the 'result' of a service rpc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 8 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
« 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;
(...skipping 11 matching lines...) Expand all
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 27
28 kBreakpointAdded, 28 kBreakpointAdded,
29 kBreakpointResolved, 29 kBreakpointResolved,
30 kBreakpointRemoved, 30 kBreakpointRemoved,
31 31
32 kGC,
33
32 kIllegal, 34 kIllegal,
33 }; 35 };
34 36
35 ServiceEvent(Isolate* isolate, EventType event_type) 37 ServiceEvent(Isolate* isolate, EventType event_type)
36 : isolate_(isolate), 38 : isolate_(isolate),
37 type_(event_type), 39 type_(event_type),
38 breakpoint_(NULL), 40 breakpoint_(NULL),
39 top_frame_(NULL), 41 top_frame_(NULL),
40 exception_(NULL) {} 42 exception_(NULL),
43 gc_stats_(NULL) {}
41 44
42 explicit ServiceEvent(const DebuggerEvent* debugger_event); 45 explicit ServiceEvent(const DebuggerEvent* debugger_event);
43 46
44 Isolate* isolate() const { return isolate_; } 47 Isolate* isolate() const { return isolate_; }
45 48
46 EventType type() const { return type_; } 49 EventType type() const { return type_; }
47 50
48 SourceBreakpoint* breakpoint() const { 51 SourceBreakpoint* breakpoint() const {
49 return breakpoint_; 52 return breakpoint_;
50 } 53 }
(...skipping 17 matching lines...) Expand all
68 } 71 }
69 72
70 const Object* exception() const { 73 const Object* exception() const {
71 return exception_; 74 return exception_;
72 } 75 }
73 void set_exception(const Object* exception) { 76 void set_exception(const Object* exception) {
74 ASSERT(type_ == kPauseException); 77 ASSERT(type_ == kPauseException);
75 exception_ = exception; 78 exception_ = exception;
76 } 79 }
77 80
81 const Heap::GCStats* gc_stats() const {
82 return gc_stats_;
83 }
84
85 void set_gc_stats(const Heap::GCStats* gc_stats) {
86 gc_stats_ = gc_stats;
87 }
88
78 void PrintJSON(JSONStream* js) const; 89 void PrintJSON(JSONStream* js) const;
79 90
80 static const char* EventTypeToCString(EventType type); 91 static const char* EventTypeToCString(EventType type);
81 92
82 private: 93 private:
83 Isolate* isolate_; 94 Isolate* isolate_;
84 EventType type_; 95 EventType type_;
85 SourceBreakpoint* breakpoint_; 96 SourceBreakpoint* breakpoint_;
86 ActivationFrame* top_frame_; 97 ActivationFrame* top_frame_;
87 const Object* exception_; 98 const Object* exception_;
99 const Heap::GCStats* gc_stats_;
88 }; 100 };
89 101
90 } // namespace dart 102 } // namespace dart
91 103
92 #endif // VM_SERVICE_EVENT_H_ 104 #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