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

Unified Diff: runtime/observatory/lib/service_common.dart

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 | « CHANGELOG.md ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/service_common.dart
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index 0580f5cdbd08a21802eca79a8dcfcfa3b043a504..0faa080bb8cc00abe77b3eca452d9434894e26a1 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -204,11 +204,11 @@ abstract class CommonWebSocketVM extends VM {
bytes.offsetInBytes + offset,
bytes.lengthInBytes - offset);
var map = _parseJSON(meta);
- if (map == null) {
+ if (map == null || map['method'] != 'streamNotify') {
return;
}
- var event = map['event'];
- var streamId = map['streamId'];
+ var event = map['params']['event'];
+ var streamId = map['params']['streamId'];
postServiceEvent(streamId, event, data);
});
}
@@ -218,9 +218,10 @@ abstract class CommonWebSocketVM extends VM {
if (map == null) {
return;
}
- var event = map['event'];
- if (event != null) {
- var streamId = map['streamId'];
+
+ if (map['method'] == 'streamNotify') {
+ var event = map['params']['event'];
+ var streamId = map['params']['streamId'];
postServiceEvent(streamId, event, null);
return;
}
« no previous file with comments | « CHANGELOG.md ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698