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

Unified Diff: vm/dart_api_impl.cc

Issue 9652016: - Move finalization until after the classes in dart:builtin have been loaded. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl.cc
===================================================================
--- vm/dart_api_impl.cc (revision 5194)
+++ vm/dart_api_impl.cc (working copy)
@@ -2984,14 +2984,6 @@
library.set_import_map(mapping_array);
}
library.Register();
- // If this is the dart:builtin library register it with the VM.
- if (url_str.Equals("dart:builtin")) {
- isolate->object_store()->set_builtin_library(library);
- const char* msg = CheckIsolateState(isolate);
- if (msg != NULL) {
- return Api::NewError(msg);
- }
- }
} else if (!library.LoadNotStarted()) {
// The source for this library has either been loaded or is in the
// process of loading. Return an error.
@@ -3005,6 +2997,19 @@
source_str,
RawScript::kLibrary,
&result);
+ // Propagate the error out right now.
+ if (Dart_IsError(result)) {
+ return result;
+ }
+
+ // If this is the dart:builtin library register it with the VM.
+ if (url_str.Equals("dart:builtin")) {
+ isolate->object_store()->set_builtin_library(library);
+ const char* msg = CheckIsolateState(isolate);
+ if (msg != NULL) {
+ return Api::NewError(msg);
+ }
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698