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

Unified Diff: runtime/vm/isolate.cc

Issue 8659012: Add Dart API scoping around the call to Dart_HandleMessage. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
« runtime/vm/dart_api_impl_test.cc ('K') | « runtime/vm/dart_api_impl_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 1867)
+++ runtime/vm/isolate.cc (working copy)
@@ -248,12 +248,18 @@
PortMessage* message = message_queue()->Dequeue(0);
if (message != NULL) {
+ Dart_EnterScope();
Dart_Handle result = Dart_HandleMessage(
message->dest_port(), message->reply_port(), message->data());
if (Dart_IsError(result)) {
+ // TODO(turnidge): Consider passing this error out to
+ // Dart_RunLoop so that the embedder can choose how to handle
+ // it.
fprintf(stderr, "%s\n", Dart_GetError(result));
+ Dart_ExitScope();
exit(255);
}
+ Dart_ExitScope();
delete message;
}
}
« runtime/vm/dart_api_impl_test.cc ('K') | « runtime/vm/dart_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698