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

Unified Diff: runtime/vm/dart.cc

Issue 9169102: Add Dart_PropagateError. (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/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
===================================================================
--- runtime/vm/dart.cc (revision 3804)
+++ runtime/vm/dart.cc (working copy)
@@ -10,7 +10,6 @@
#include "vm/handles.h"
#include "vm/heap.h"
#include "vm/isolate.h"
-#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/port.h"
@@ -63,7 +62,7 @@
}
-void Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
+RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
// Initialize the new isolate.
TIMERSCOPE(time_isolate_initialization);
Isolate* isolate = Isolate::Current();
@@ -74,7 +73,10 @@
ObjectStore::Init(isolate);
if (snapshot_buffer == NULL) {
- Object::Init(isolate);
+ const Error& error = Error::Handle(Object::Init(isolate));
+ if (!error.IsNull()) {
+ return error.raw();
+ }
} else {
// Initialize from snapshot (this should replicate the functionality
// of Object::Init(..) in a regular isolate creation path.
@@ -87,6 +89,7 @@
StubCode::Init(isolate);
CodeIndexTable::Init(isolate);
isolate->set_init_callback_data(data);
+ return Error::null();
}
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698