Chromium Code Reviews| 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 patch, | 8 import 'dart:_js_helper' show patch, |
| 9 checkInt, | 9 checkInt, |
| 10 getRuntimeType, | 10 getRuntimeType, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 @patch | 43 @patch |
| 44 dynamic noSuchMethod(Invocation invocation) { | 44 dynamic noSuchMethod(Invocation invocation) { |
| 45 throw new NoSuchMethodError( | 45 throw new NoSuchMethodError( |
| 46 this, | 46 this, |
| 47 invocation.memberName, | 47 invocation.memberName, |
| 48 invocation.positionalArguments, | 48 invocation.positionalArguments, |
| 49 invocation.namedArguments); | 49 invocation.namedArguments); |
| 50 } | 50 } |
| 51 | 51 |
| 52 @patch | 52 @patch |
| 53 Type get runtimeType => getRuntimeType(this); | 53 Type get runtimeType => JS('Type', 'dart.runtimeType(#)', this); // getRuntime Type(this); |
|
Jennifer Messerly
2015/04/23 19:01:42
no need to keep the old code around :). Note howev
vsm
2015/04/23 20:35:55
Done.
| |
| 54 } | 54 } |
| 55 | 55 |
| 56 // Patch for Function implementation. | 56 // Patch for Function implementation. |
| 57 @patch | 57 @patch |
| 58 class Function { | 58 class Function { |
| 59 @patch | 59 @patch |
| 60 static apply(Function f, | 60 static apply(Function f, |
| 61 List positionalArguments, | 61 List positionalArguments, |
| 62 [Map<Symbol, dynamic> namedArguments]) { | 62 [Map<Symbol, dynamic> namedArguments]) { |
| 63 return Primitives.applyFunction( | 63 return Primitives.applyFunction( |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 @patch | 457 @patch |
| 458 static bool get _isWindows => false; | 458 static bool get _isWindows => false; |
| 459 | 459 |
| 460 @patch | 460 @patch |
| 461 static Uri get base { | 461 static Uri get base { |
| 462 String uri = Primitives.currentUri(); | 462 String uri = Primitives.currentUri(); |
| 463 if (uri != null) return Uri.parse(uri); | 463 if (uri != null) return Uri.parse(uri); |
| 464 throw new UnsupportedError("'Uri.base' is not supported"); | 464 throw new UnsupportedError("'Uri.base' is not supported"); |
| 465 } | 465 } |
| 466 } | 466 } |
| OLD | NEW |