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

Unified Diff: runtime/vm/debugger.h

Issue 979823003: Major rework of vm service events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.h
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 3f9c2078c91755be5e0be66eb4453b4785ea04b8..69b03d1b89d0cdd7b8a8277af32b17667ed7cb01 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -277,8 +277,6 @@ typedef void BreakpointHandler(Dart_Port isolate_id,
DebuggerStackTrace* stack);
-// TODO(turnidge): At some point we may want to turn this into a class
-// hierarchy.
class DebuggerEvent {
public:
enum EventType {
@@ -288,7 +286,6 @@ class DebuggerEvent {
kIsolateCreated = 4,
kIsolateShutdown = 5,
kIsolateInterrupted = 6,
- kIsolateResumed = 7,
};
explicit DebuggerEvent(Isolate* isolate, EventType event_type)
@@ -302,12 +299,18 @@ class DebuggerEvent {
EventType type() const { return type_; }
+ bool IsPauseEvent() const {
+ return (type_ == kBreakpointReached ||
+ type_ == kIsolateInterrupted ||
+ type_ == kExceptionThrown);
+ }
+
ActivationFrame* top_frame() const {
- ASSERT(type_ == kBreakpointReached);
+ ASSERT(IsPauseEvent());
return top_frame_;
}
void set_top_frame(ActivationFrame* frame) {
- ASSERT(type_ == kBreakpointReached);
+ ASSERT(IsPauseEvent());
top_frame_ = frame;
}
@@ -333,10 +336,6 @@ class DebuggerEvent {
return isolate_->main_port();
}
- void PrintJSON(JSONStream* js) const;
-
- static const char* EventTypeToCString(EventType type);
-
private:
Isolate* isolate_;
EventType type_;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698