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

Unified Diff: mojo/edk/embedder/named_platform_handle_utils_win.cc

Issue 2466433002: Add mojo::edk::ClosePeerConnection. (Closed)
Patch Set: Created 4 years, 1 month 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 | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/named_platform_handle_utils_win.cc
diff --git a/mojo/edk/embedder/named_platform_handle_utils_win.cc b/mojo/edk/embedder/named_platform_handle_utils_win.cc
index 1a602d1a4c74559dd92f4f5e1cd2ba68b05c76a4..a145847fd04e592d11baa4c510a8436e45abe05e 100644
--- a/mojo/edk/embedder/named_platform_handle_utils_win.cc
+++ b/mojo/edk/embedder/named_platform_handle_utils_win.cc
@@ -49,7 +49,12 @@ ScopedPlatformHandle CreateClientHandle(
0, // No sharing.
nullptr, OPEN_EXISTING, kFlags,
nullptr))); // No template file.
- PCHECK(handle.is_valid());
+ // The server may have stopped accepting a connection between the
+ // WaitNamedPipe() and CreateFile(). If this occurs, an invalid handle is
+ // returned.
+ DPLOG_IF(ERROR, !handle.is_valid())
+ << "Named pipe " << named_handle.pipe_name()
+ << " could not be opened after WaitNamedPipe succeeded";
return handle;
}
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698