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 |