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

Unified Diff: runtime/vm/service_event.cc

Issue 1132153002: Add Debugger.inspect. 1976 here we come! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/service_event.h ('k') | sdk/lib/_internal/compiler/js_lib/developer_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index c1be69047f8ce418d0ac75e603eef32c2fb38fd6..070125d6f299f7f4cf83a5c23ff1963874633da7 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -37,6 +37,7 @@ ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
breakpoint_(NULL),
top_frame_(NULL),
exception_(NULL),
+ inspectee_(NULL),
gc_stats_(NULL) {
DebuggerEvent::EventType type = debugger_event->type();
if (type == DebuggerEvent::kBreakpointReached) {
@@ -81,6 +82,8 @@ const char* ServiceEvent::EventTypeToCString(EventType type) {
return "BreakpointRemoved";
case kGC:
return "GC"; // TODO(koda): Change to GarbageCollected.
+ case kInspect:
+ return "Inspect";
default:
UNREACHABLE();
return "Unknown";
@@ -103,6 +106,9 @@ void ServiceEvent::PrintJSON(JSONStream* js) const {
if (exception() != NULL) {
jsobj.AddProperty("exception", *(exception()));
}
+ if (inspectee() != NULL) {
+ jsobj.AddProperty("inspectee", *(inspectee()));
+ }
if (gc_stats() != NULL) {
jsobj.AddProperty("reason", Heap::GCReasonToString(gc_stats()->reason_));
isolate()->heap()->PrintToJSONObject(Heap::kNew, &jsobj);
« no previous file with comments | « runtime/vm/service_event.h ('k') | sdk/lib/_internal/compiler/js_lib/developer_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698