Chromium Code Reviews| Index: runtime/bin/builtin.dart |
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
| index ceba8cd0348e0d73bccb9fd101fe69ce39ba22e8..15fc98e68a57fbeea97ea062297c046fd394bc92 100644 |
| --- a/runtime/bin/builtin.dart |
| +++ b/runtime/bin/builtin.dart |
| @@ -343,6 +343,18 @@ _setupHooks() { |
| VMLibraryHooks.resolvePackageUriFuture = _resolvePackageUriFuture; |
| } |
| +// Class used by Dartium to setup VMLibraryHooks. |
| +class DartiumSetup { |
| + static Uri resolvePackageUri(String resolvedUri) native "Utils_resolvePackageUri"; |
| + |
| + static Uri _resolveUri(Uri packageUri) => resolvePackageUri(packageUri.toString()); |
| + |
| + static void _setupHooks() { |
| + _setupCompleted = true; |
| + VMLibraryHooks.resolvePackageUriFuture = _resolveUri; |
| + } |
| +} |
|
siva
2017/01/06 21:33:43
Why does this class have to be in builtin.dart?
It
terry
2017/01/06 21:41:17
I need to get to VMLibraryHooks which is in dart:_
siva
2017/01/06 21:42:53
import 'dart:internal'; should get you access to t
|
| + |
| // Handling of Resource class by dispatching to the load port. |
| Future<List<int>> _resourceReadAsBytes(Uri uri) async { |
| List response = await _makeLoaderRequest(_Dart_kResourceLoad, uri.toString()); |