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

Unified Diff: runtime/vm/service.cc

Issue 1257943003: Support JSON-RPC 2.0-compatible VM service events. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cr Created 5 years, 5 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/observatory/lib/service_common.dart ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 4674f143e656d646e288ec0981b222196f61291e..71924896a7e7400b304c734829868900a18d9add 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -681,8 +681,11 @@ void Service::HandleEvent(ServiceEvent* event) {
ASSERT(stream_id != NULL);
{
JSONObject jsobj(&js);
- jsobj.AddProperty("event", event);
- jsobj.AddProperty("streamId", stream_id);
+ jsobj.AddProperty("jsonrpc", "2.0");
+ jsobj.AddProperty("method", "streamNotify");
+ JSONObject params(&jsobj, "params");
+ params.AddProperty("streamId", stream_id);
+ params.AddProperty("event", event);
}
PostEvent(stream_id, event->KindAsCString(), &js);
}
« no previous file with comments | « runtime/observatory/lib/service_common.dart ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698