| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 class _Utils { | 7 class _Utils { |
| 8 static double dateTimeToDouble(DateTime dateTime) => | 8 static double dateTimeToDouble(DateTime dateTime) => |
| 9 dateTime.millisecondsSinceEpoch.toDouble(); | 9 dateTime.millisecondsSinceEpoch.toDouble(); |
| 10 static DateTime doubleToDateTime(double dateTime) { | 10 static DateTime doubleToDateTime(double dateTime) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } else if (cmd == _PRINT) { | 177 } else if (cmd == _PRINT) { |
| 178 final message = msg[1]; | 178 final message = msg[1]; |
| 179 // TODO(antonm): we need somehow identify those isolates. | 179 // TODO(antonm): we need somehow identify those isolates. |
| 180 print('[From isolate] $message'); | 180 print('[From isolate] $message'); |
| 181 } | 181 } |
| 182 }); | 182 }); |
| 183 } | 183 } |
| 184 | 184 |
| 185 final _printClosure = window.console.log; | 185 final _printClosure = window.console.log; |
| 186 final _pureIsolatePrintClosure = (s) { | 186 final _pureIsolatePrintClosure = (s) { |
| 187 _sendToHelperIsolate([_PRINT, s]); | 187 _sendToHelperIsolate([_PRINT, s], null); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 final _forwardingPrintClosure = _Utils.forwardingPrint; | 190 final _forwardingPrintClosure = _Utils.forwardingPrint; |
| OLD | NEW |