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

Unified Diff: bin/main.cc

Issue 8537023: Implement automatic loading of dart:core_native_fields library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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
Index: bin/main.cc
===================================================================
--- bin/main.cc (revision 1520)
+++ bin/main.cc (working copy)
@@ -170,7 +170,6 @@
Dart_ExitScope();
exit(255);
}
-
if (!Dart_IsLibrary(library)) {
fprintf(stderr,
"Expected a library when loading script: %s",
@@ -178,9 +177,7 @@
Dart_ExitScope();
exit(255);
}
- Builtin_ImportLibrary(library);
- // Setup the native resolver for built in library functions.
- Builtin_SetNativeResolver();
+ Builtin_ImportLibrary(library); // Import builtin library.
Dart_ExitScope();
return data;
@@ -238,6 +235,12 @@
}
Dart_EnterScope();
+
+ if (snapshot_buffer != NULL) {
+ // Setup the native resolver as the snapshot does not carry it.
+ Builtin_SetNativeResolver();
+ }
+
if (HasCompileAll(vm_options)) {
Dart_Handle result = Dart_CompileAll();
if (Dart_IsError(result)) {

Powered by Google App Engine
This is Rietveld 408576698