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

Unified Diff: runtime/bin/dbg_message.cc

Issue 1406013004: Fixes shutdown crashes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | runtime/vm/service_isolate.cc » ('j') | runtime/vm/service_isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_message.cc
diff --git a/runtime/bin/dbg_message.cc b/runtime/bin/dbg_message.cc
index d0f13d783fce0fdc892cde9237790a333c6b3ed4..89bac102cff3fb2615f4ce33d95e032b4c7b5412 100644
--- a/runtime/bin/dbg_message.cc
+++ b/runtime/bin/dbg_message.cc
@@ -1409,21 +1409,22 @@ void DbgMsgQueueList::IsolateEventHandler(Dart_IsolateId isolate_id,
msg_queue->SendIsolateEvent(isolate_id, kind);
Dart_ExitScope();
} else {
- DebuggerConnectionHandler::WaitForConnection();
DbgMsgQueue* msg_queue = GetIsolateMsgQueue(isolate_id);
- ASSERT(msg_queue != NULL);
- Dart_EnterScope();
- msg_queue->SendQueuedMsgs();
- msg_queue->SendIsolateEvent(isolate_id, kind);
- if (kind == kInterrupted) {
- msg_queue->MessageLoop();
- } else {
- ASSERT(kind == kShutdown);
- RemoveIsolateMsgQueue(isolate_id);
- }
- Dart_ExitScope();
// If there is no receive message queue, do not wait for a connection, and
// ignore the message.
+ if (msg_queue != NULL) {
Cutch 2015/10/26 21:39:44 As discussed offline- this should remain an ASSERT
zra 2015/10/26 21:49:58 Done.
+ DebuggerConnectionHandler::WaitForConnection();
+ Dart_EnterScope();
+ msg_queue->SendQueuedMsgs();
+ msg_queue->SendIsolateEvent(isolate_id, kind);
+ if (kind == kInterrupted) {
+ msg_queue->MessageLoop();
+ } else {
+ ASSERT(kind == kShutdown);
+ RemoveIsolateMsgQueue(isolate_id);
+ }
+ Dart_ExitScope();
+ }
}
}
« no previous file with comments | « no previous file | runtime/vm/service_isolate.cc » ('j') | runtime/vm/service_isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698