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_; |