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

Unified Diff: mojo/edk/system/node_channel.cc

Issue 1985993002: [mojo-edk] Fix bootstrap NodeChannel Start/ShutDown race (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_channel.cc
diff --git a/mojo/edk/system/node_channel.cc b/mojo/edk/system/node_channel.cc
index 885750d66786674d008f5f75e7b65d54a99240ca..3135acbd152369caf1db0bada894e6e2840a6d79 100644
--- a/mojo/edk/system/node_channel.cc
+++ b/mojo/edk/system/node_channel.cc
@@ -172,8 +172,9 @@ void NodeChannel::Start() {
#endif
base::AutoLock lock(channel_lock_);
- DCHECK(channel_);
- channel_->Start();
+ // ShutDown() may have already been called, in which case |channel_| is null.
+ if (channel_)
+ channel_->Start();
}
void NodeChannel::ShutDown() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698