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

Unified Diff: runtime/vm/custom_isolate_test.cc

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 years, 3 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/cpuinfo_test.cc ('k') | runtime/vm/dart.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/custom_isolate_test.cc
diff --git a/runtime/vm/custom_isolate_test.cc b/runtime/vm/custom_isolate_test.cc
index af3050759d462e2acb54cc904b936cf47a33f163..2cb2e0047b8b967d0ba4a756e9b35c467819fda0 100644
--- a/runtime/vm/custom_isolate_test.cc
+++ b/runtime/vm/custom_isolate_test.cc
@@ -59,6 +59,7 @@ static const char* kCustomIsolateScriptChars =
" var replyTo = message[1];\n"
" echo('Received: $data');\n"
" replyTo.send(data + 1);\n"
+ " mainPort.close();\n"
" };\n"
"}\n"
"\n"
@@ -179,6 +180,7 @@ void StartEvent::Process() {
free(const_cast<char*>(main_));
main_ = NULL;
+ Dart_SetMessageNotifyCallback(NULL);
Dart_ExitScope();
Dart_ExitIsolate();
}
@@ -207,6 +209,7 @@ void MessageEvent::Process() {
if (!Dart_HasLivePorts()) {
OS::Print("<< Shutting down isolate(%p)\n", isolate());
event_queue->RemoveEventsForIsolate(isolate());
+ Dart_SetMessageNotifyCallback(NULL);
Dart_ShutdownIsolate();
} else {
Dart_ExitScope();
@@ -350,6 +353,7 @@ UNIT_TEST_CASE(CustomIsolates) {
free(const_cast<char*>(saved_echo));
delete event_queue;
+ event_queue = NULL;
}
} // namespace dart
« no previous file with comments | « runtime/vm/cpuinfo_test.cc ('k') | runtime/vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698