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

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

Issue 1957893002: Avoid initializing child processes with an invalid parent pipe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
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/core.cc
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc
index 69c918c0be8b50df111abb11646daac1a610a3b9..d3543061003fb035d5b9d2f88b677aeae43fdc21 100644
--- a/mojo/edk/system/core.cc
+++ b/mojo/edk/system/core.cc
@@ -87,7 +87,8 @@ void Core::AddChild(base::ProcessHandle process_handle,
}
void Core::InitChild(ScopedPlatformHandle platform_handle) {
- GetNodeController()->ConnectToParent(std::move(platform_handle));
+ if (platform_handle.is_valid())
+ GetNodeController()->ConnectToParent(std::move(platform_handle));
}
MojoHandle Core::AddDispatcher(scoped_refptr<Dispatcher> dispatcher) {
« 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