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

Side by Side Diff: runtime/vm/service/vmservice.dart

Issue 474633002: Optional binary payloads in VM service events. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« runtime/vm/service.cc ('K') | « runtime/vm/service/client.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library vmservice; 5 library vmservice;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 switch (code) { 75 switch (code) {
76 case Constants.ISOLATE_STARTUP_MESSAGE_ID: 76 case Constants.ISOLATE_STARTUP_MESSAGE_ID:
77 runningIsolates.isolateStartup(port_id, sp, name); 77 runningIsolates.isolateStartup(port_id, sp, name);
78 break; 78 break;
79 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID: 79 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID:
80 runningIsolates.isolateShutdown(port_id, sp); 80 runningIsolates.isolateShutdown(port_id, sp);
81 break; 81 break;
82 } 82 }
83 } 83 }
84 84
85 void _eventMessageHandler(int eventType, String eventMessage) { 85 void _eventMessageHandler(int eventType, dynamic eventMessage) {
86 var subscribers = eventMap[eventType]; 86 var subscribers = eventMap[eventType];
87 if (subscribers == null) { 87 if (subscribers == null) {
88 return; 88 return;
89 } 89 }
90 for (var subscriber in subscribers) { 90 for (var subscriber in subscribers) {
91 subscriber.post(null, eventMessage); 91 subscriber.post(null, eventMessage);
92 } 92 }
93 } 93 }
94 94
95 void messageHandler(message) { 95 void messageHandler(message) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return new VMService().eventPort; 147 return new VMService().eventPort;
148 } 148 }
149 149
150 void _registerIsolate(int port_id, SendPort sp, String name) { 150 void _registerIsolate(int port_id, SendPort sp, String name) {
151 var service = new VMService(); 151 var service = new VMService();
152 service.runningIsolates.isolateStartup(port_id, sp, name); 152 service.runningIsolates.isolateStartup(port_id, sp, name);
153 } 153 }
154 154
155 void _setEventMask(int mask) 155 void _setEventMask(int mask)
156 native "VMService_SetEventMask"; 156 native "VMService_SetEventMask";
OLDNEW
« runtime/vm/service.cc ('K') | « runtime/vm/service/client.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698