Index: runtime/vm/message_handler.cc |
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc |
index 741bbba44a3ab4d7d96b07b95e4560964848b575..4a5ad31615ca4e7cc7b1aadfd2da24e479ce5d0d 100644 |
--- a/runtime/vm/message_handler.cc |
+++ b/runtime/vm/message_handler.cc |
@@ -137,6 +137,9 @@ Message* MessageHandler::DequeueMessage(Message::Priority min_priority) { |
bool MessageHandler::HandleMessages(bool allow_normal_messages, |
bool allow_multiple_normal_messages) { |
+ // If isolate() returns NULL StartIsolateScope does nothing. |
+ StartIsolateScope start_isolate(isolate()); |
+ |
// TODO(turnidge): Add assert that monitor_ is held here. |
bool result = true; |
Message::Priority min_priority = (allow_normal_messages && !paused()) ? |