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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_process_host.cc

Issue 24806002: Add comment in NativeMessageProcessHost::HandleReadResult() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: chrome/browser/extensions/api/messaging/native_message_process_host.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
index d559d2e60da0dcb1dcfb6a29e62a4fd9f97d64ac..bf920fbd98b5353f736f239d42462fefc5fbfb6a 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
@@ -248,6 +248,8 @@ void NativeMessageProcessHost::HandleReadResult(int result) {
} else if (result == net::ERR_IO_PENDING) {
read_pending_ = true;
} else if (result == 0 || result == net::ERR_CONNECTION_RESET) {
+ // On Windows we get net::ERR_CONNECTION_RESET for a broken pipe, while on
+ // Posix read() returns 0 in that case.
Close(kNativeHostExited);
} else {
LOG(ERROR) << "Error when reading from Native Messaging host: " << result;
« 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