| 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 // Patch file for dart:core classes. | 5 // Patch file for dart:core classes. |
| 6 import "dart:_internal" as _symbol_dev; | 6 import "dart:_internal" as _symbol_dev; |
| 7 import 'dart:_interceptors'; | 7 import 'dart:_interceptors'; |
| 8 import 'dart:_js_helper' show checkNull, | 8 import 'dart:_js_helper' show checkNull, |
| 9 getRuntimeType, | 9 getRuntimeType, |
| 10 JSSyntaxRegExp, | 10 JSSyntaxRegExp, |
| 11 Primitives, | 11 Primitives, |
| 12 stringJoinUnchecked, | 12 stringJoinUnchecked, |
| 13 objectHashCode; | 13 objectHashCode; |
| 14 | 14 |
| 15 import 'dart:_js_primitives' as jsPrimitives; |
| 16 |
| 15 String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol); | 17 String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol); |
| 16 | 18 |
| 17 _symbolMapToStringMap(Map<Symbol, dynamic> map) { | 19 _symbolMapToStringMap(Map<Symbol, dynamic> map) { |
| 18 if (map == null) return null; | 20 if (map == null) return null; |
| 19 var result = new Map<String, dynamic>(); | 21 var result = new Map<String, dynamic>(); |
| 20 map.forEach((Symbol key, value) { | 22 map.forEach((Symbol key, value) { |
| 21 result[_symbolToString(key)] = value; | 23 result[_symbolToString(key)] = value; |
| 22 }); | 24 }); |
| 23 return result; | 25 return result; |
| 24 } | 26 } |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 325 |
| 324 patch class Uri { | 326 patch class Uri { |
| 325 patch static bool get _isWindows => false; | 327 patch static bool get _isWindows => false; |
| 326 | 328 |
| 327 patch static Uri get base { | 329 patch static Uri get base { |
| 328 String uri = Primitives.currentUri(); | 330 String uri = Primitives.currentUri(); |
| 329 if (uri != null) return Uri.parse(uri); | 331 if (uri != null) return Uri.parse(uri); |
| 330 throw new UnsupportedError("'Uri.base' is not supported"); | 332 throw new UnsupportedError("'Uri.base' is not supported"); |
| 331 } | 333 } |
| 332 } | 334 } |
| 335 |
| 336 patch void get breakpoint { |
| 337 jsPrimitives.breakpoint(); |
| 338 } |
| OLD | NEW |