OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:isolate'; | 5 import 'dart:isolate'; |
6 | 6 |
7 patch bool debugger({bool when: true, | 7 patch bool debugger({bool when: true, |
8 String message}) native "Developer_debugger"; | 8 String message}) native "Developer_debugger"; |
9 | 9 |
10 patch Object inspect(Object object) native "Developer_inspect"; | 10 patch Object inspect(Object object) native "Developer_inspect"; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 _log(String message, | 46 _log(String message, |
47 int timestamp, | 47 int timestamp, |
48 int sequenceNumber, | 48 int sequenceNumber, |
49 int level, | 49 int level, |
50 String name, | 50 String name, |
51 Zone zone, | 51 Zone zone, |
52 Object error, | 52 Object error, |
53 StackTrace stackTrace) native "Developer_log"; | 53 StackTrace stackTrace) native "Developer_log"; |
54 | 54 |
| 55 patch void _postEvent(String eventKind, String eventData) |
| 56 native "Developer_postEvent"; |
| 57 |
55 patch ServiceExtensionHandler _lookupExtension(String method) | 58 patch ServiceExtensionHandler _lookupExtension(String method) |
56 native "Developer_lookupExtension"; | 59 native "Developer_lookupExtension"; |
57 | 60 |
58 patch _registerExtension(String method, ServiceExtensionHandler handler) | 61 patch _registerExtension(String method, ServiceExtensionHandler handler) |
59 native "Developer_registerExtension"; | 62 native "Developer_registerExtension"; |
60 | 63 |
61 // This code is only invoked when there is no other Dart code on the stack. | 64 // This code is only invoked when there is no other Dart code on the stack. |
62 _runExtension(ServiceExtensionHandler handler, | 65 _runExtension(ServiceExtensionHandler handler, |
63 String method, | 66 String method, |
64 List<String> parameterKeys, | 67 List<String> parameterKeys, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 sb.write('"result":'); | 130 sb.write('"result":'); |
128 } | 131 } |
129 sb.write('${response._toString()},'); | 132 sb.write('${response._toString()},'); |
130 if (id is String) { | 133 if (id is String) { |
131 sb.write('"id":"$id"}'); | 134 sb.write('"id":"$id"}'); |
132 } else { | 135 } else { |
133 sb.write('"id":$id}'); | 136 sb.write('"id":$id}'); |
134 } | 137 } |
135 replyPort.send(sb.toString()); | 138 replyPort.send(sb.toString()); |
136 } | 139 } |
OLD | NEW |