Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: runtime/bin/builtin.dart

Issue 2611353002: Added VMLibraryHooks setup for Dartium to support resolvePackageUri. (Closed)
Patch Set: Updated Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698