OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 // Patch file for dart:developer library. |
| 6 |
| 7 import 'dart:_js_helper' show patch, ForceInline; |
| 8 import 'dart:_foreign_helper' show JS; |
| 9 |
| 10 @patch |
| 11 // @ForceInline() |
| 12 bool debugger({bool when: true, String message}) { |
| 13 if (when) { |
| 14 JS('', 'debugger'); |
| 15 } |
| 16 return when; |
| 17 } |
| 18 |
| 19 @patch |
| 20 Object inspect(Object object) { |
| 21 return object; |
| 22 } |
| 23 |
| 24 @patch |
| 25 void log(String message, |
| 26 {DateTime time, |
| 27 int sequenceNumber, |
| 28 int level: 0, |
| 29 String name: '', |
| 30 Zone zone, |
| 31 Object error, |
| 32 StackTrace stackTrace}) { |
| 33 // TODO. |
| 34 } |
| 35 |
| 36 final _extensions = new Map<String, ServiceExtensionHandler>(); |
| 37 |
| 38 @patch |
| 39 ServiceExtensionHandler _lookupExtension(String method) { |
| 40 return _extensions[method]; |
| 41 } |
| 42 |
| 43 @patch |
| 44 _registerExtension(String method, ServiceExtensionHandler handler) { |
| 45 _extensions[method] = handler; |
| 46 } |
| 47 |
| 48 @patch |
| 49 _postEvent(String eventKind, String eventData) { |
| 50 // TODO. |
| 51 } |
| 52 |
| 53 |
| 54 @patch |
| 55 bool _isDartStreamEnabled() { |
| 56 return false; |
| 57 } |
| 58 |
| 59 @patch |
| 60 int _getTraceClock() { |
| 61 // TODO. |
| 62 return _clockValue++; |
| 63 } |
| 64 int _clockValue = 0; |
| 65 |
| 66 @patch |
| 67 int _getThreadCpuClock() { |
| 68 return -1; |
| 69 } |
| 70 |
| 71 |
| 72 @patch |
| 73 void _reportCompleteEvent(int start, |
| 74 int startCpu, |
| 75 String category, |
| 76 String name, |
| 77 String argumentsAsJson) { |
| 78 // TODO. |
| 79 } |
| 80 |
| 81 @patch |
| 82 void _reportInstantEvent(int start, |
| 83 String category, |
| 84 String name, |
| 85 String argumentsAsJson) { |
| 86 // TODO. |
| 87 } |
| 88 |
| 89 @patch |
| 90 int _getNextAsyncId() { |
| 91 return 0; |
| 92 } |
| 93 |
| 94 @patch |
| 95 int _getIsolateNum() { |
| 96 return 0; |
| 97 } |
| 98 |
| 99 @patch |
| 100 void _reportTaskEvent(int start, |
| 101 int taskId, |
| 102 String phase, |
| 103 String category, |
| 104 String name, |
| 105 String argumentsAsJson) { |
| 106 // TODO. |
| 107 } |
| 108 |
| 109 @patch |
| 110 int _getServiceMajorVersion() { |
| 111 return 0; |
| 112 } |
| 113 |
| 114 @patch |
| 115 int _getServiceMinorVersion() { |
| 116 return 0; |
| 117 } |
| 118 |
| 119 @patch |
| 120 void _getServerInfo(SendPort sp) { |
| 121 sp.send(null); |
| 122 } |
| 123 |
| 124 @patch |
| 125 void _webServerControl(SendPort sp, bool enable) { |
| 126 sp.send(null); |
| 127 } |
OLD | NEW |