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

Unified Diff: runtime/vm/object.cc

Issue 9316071: Dart_PropagateError, take 2. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 3862)
+++ runtime/vm/object.cc (working copy)
@@ -399,7 +399,7 @@
}
-void Object::Init(Isolate* isolate) {
+RawError* Object::Init(Isolate* isolate) {
TIMERSCOPE(time_bootstrap);
ObjectStore* object_store = isolate->object_store();
@@ -645,8 +645,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();
@@ -656,6 +663,7 @@
cls.set_super_type(Type::Handle());
ClassFinalizer::VerifyBootstrapClasses();
+ return Error::null();
}
@@ -4693,7 +4701,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();
@@ -4702,17 +4711,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();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698