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

Unified Diff: runtime/vm/object.cc

Issue 9169102: Add Dart_PropagateError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Removed some unneeded includes Created 8 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 3415)
+++ runtime/vm/object.cc (working copy)
@@ -394,7 +394,7 @@
}
-void Object::Init(Isolate* isolate) {
+RawError* Object::Init(Isolate* isolate) {
TIMERSCOPE(time_bootstrap);
ObjectStore* object_store = isolate->object_store();
@@ -629,8 +629,15 @@
// Finish the initialization by compiling the bootstrap scripts containing the
// base interfaces and the implementation of the internal classes.
- Bootstrap::Compile(core_lib, script);
- Bootstrap::Compile(core_impl_lib, impl_script);
+ Error& error = Error::Handle();
+ error = Bootstrap::Compile(core_lib, script);
+ if (!error.IsNull()) {
+ return error.raw();
+ }
+ error = Bootstrap::Compile(core_impl_lib, impl_script);
+ if (!error.IsNull()) {
+ return error.raw();
+ }
Bootstrap::SetupNativeResolver();
@@ -640,6 +647,7 @@
cls.set_super_type(Type::Handle());
ClassFinalizer::VerifyBootstrapClasses();
+ return Error::null();
}
@@ -4467,7 +4475,8 @@
}
-void Library::CompileAll() {
+RawError* Library::CompileAll() {
+ Error& error = Error::Handle();
Library& lib = Library::Handle(
Isolate::Current()->object_store()->registered_libraries());
Class& cls = Class::Handle();
@@ -4476,17 +4485,18 @@
while (it.HasNext()) {
cls ^= it.GetNextClass();
if (!cls.is_interface()) {
- Compiler::CompileAllFunctions(cls);
+ error = Compiler::CompileAllFunctions(cls);
}
}
Array& anon_classes = Array::Handle(lib.raw_ptr()->anonymous_classes_);
for (int i = 0; i < lib.raw_ptr()->num_anonymous_; i++) {
cls ^= anon_classes.At(i);
ASSERT(!cls.is_interface());
- Compiler::CompileAllFunctions(cls);
+ error = Compiler::CompileAllFunctions(cls);
}
lib = lib.next_registered();
}
+ return error.raw();
}

Powered by Google App Engine
This is Rietveld 408576698