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

Unified Diff: runtime/vm/debugger.h

Issue 340443006: Add support for asynchronous event notification to the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/server.dart ('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 dc176a811d0fa2a2f9fcb8af12f20a5aba26b2ff..d75f5977efe92e16a4d8f7572003f4fde3772971 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -275,12 +275,14 @@ class DebuggerEvent {
kIsolateInterrupted = 6,
};
- explicit DebuggerEvent(EventType event_type)
- : type_(event_type),
+ explicit DebuggerEvent(Isolate* isolate, EventType event_type)
+ : isolate_(isolate),
+ type_(event_type),
top_frame_(NULL),
breakpoint_(NULL),
- exception_(NULL),
- isolate_id_(0) {}
+ exception_(NULL) {}
+
+ Isolate* isolate() const { return isolate_; }
EventType type() const { return type_; }
@@ -312,16 +314,7 @@ class DebuggerEvent {
}
Dart_Port isolate_id() const {
- ASSERT(type_ == kIsolateCreated ||
- type_ == kIsolateShutdown ||
- type_ == kIsolateInterrupted);
- return isolate_id_;
- }
- void set_isolate_id(Dart_Port isolate_id) {
- ASSERT(type_ == kIsolateCreated ||
- type_ == kIsolateShutdown ||
- type_ == kIsolateInterrupted);
- isolate_id_ = isolate_id;
+ return isolate_->main_port();
}
void PrintJSON(JSONStream* js) const;
@@ -329,17 +322,17 @@ class DebuggerEvent {
static const char* EventTypeToCString(EventType type);
private:
+ Isolate* isolate_;
EventType type_;
ActivationFrame* top_frame_;
SourceBreakpoint* breakpoint_;
const Object* exception_;
- Dart_Port isolate_id_;
};
class Debugger {
public:
- typedef void EventHandler(DebuggerEvent *event);
+ typedef void EventHandler(DebuggerEvent* event);
Debugger();
~Debugger();
@@ -447,6 +440,9 @@ class Debugger {
kSingleStep
};
+ static bool HasEventHandler();
+ static void InvokeEventHandler(DebuggerEvent* event);
+
void FindCompiledFunctions(const Script& script,
intptr_t start_pos,
intptr_t end_pos,
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698