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

Unified Diff: runtime/lib/isolate.cc

Issue 8918028: If an unhandled exception occurs in Dart_RunLoop, pass it out to the caller. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/include/dart_api.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.cc
===================================================================
--- runtime/lib/isolate.cc (revision 2436)
+++ runtime/lib/isolate.cc (working copy)
@@ -163,7 +163,7 @@
// TODO(iposva): Deserialize or call the constructor after allocating.
// For now, we only support a non-parameterized or raw target class.
const Instance& target = Instance::Handle(Instance::New(target_class));
- Instance& result = Instance::Handle();
+ Object& result = Object::Handle();
// Invoke the default constructor.
const String& period = String::Handle(String::New("."));
@@ -207,7 +207,13 @@
}
ASSERT(result.IsNull());
free(class_name);
- isolate->StandardRunLoop();
+ result = isolate->StandardRunLoop();
+ if (result.IsUnhandledException()) {
+ UnhandledException& uhe = UnhandledException::Handle();
+ uhe ^= result.raw();
+ ProcessUnhandledException(uhe);
+ }
+ ASSERT(result.IsNull());
} else {
Zone zone(isolate);
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698