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

Unified Diff: runtime/vm/dart_entry.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/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 2436)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -186,4 +186,31 @@
return result.raw();
}
+
+RawObject* DartLibraryCalls::HandleMessage(Dart_Port dest_port_id,
+ Dart_Port reply_port_id,
+ const Instance& message) {
+ const String& class_name =
+ String::Handle(String::NewSymbol("ReceivePortImpl"));
+ const String& function_name =
+ String::Handle(String::NewSymbol("_handleMessage"));
+ const int kNumArguments = 3;
+ const Array& kNoArgumentNames = Array::Handle();
+ const Function& function = Function::Handle(
+ Resolver::ResolveStatic(Library::Handle(Library::CoreLibrary()),
+ class_name,
+ function_name,
+ kNumArguments,
+ kNoArgumentNames,
+ Resolver::kIsQualified));
+ GrowableArray<const Object*> arguments(kNumArguments);
+ arguments.Add(&Integer::Handle(Integer::New(dest_port_id)));
+ arguments.Add(&Integer::Handle(Integer::New(reply_port_id)));
+ arguments.Add(&message);
+ const Object& result = Object::Handle(
+ DartEntry::InvokeStatic(function, arguments, kNoArgumentNames));
+ ASSERT(result.IsNull() || result.IsUnhandledException());
+ return result.raw();
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698