Skip to content
Permalink
Browse files
Handle broken pipes in more places in CoreIPC
Fixes <http://webkit.org/b/42784> Assertion failure in
Connection::readEventHandler when WebKitTestRunner exits

Reviewed by Anders Carlsson.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::readEventHandler): Check for a broken pipe
whenever we call ::PeekNamedPipe.

Canonical link: https://commits.webkit.org/54692@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed Jul 21, 2010
1 parent 17d953f commit 1201b81a796f75a60d0e6d5557cb4221f9df1ea0
Showing with 21 additions and 0 deletions.
  1. +13 −0 WebKit2/ChangeLog
  2. +8 −0 WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
@@ -1,3 +1,16 @@
2010-07-21 Adam Roben <aroben@apple.com>

Handle broken pipes in more places in CoreIPC

Fixes <http://webkit.org/b/42784> Assertion failure in
Connection::readEventHandler when WebKitTestRunner exits

Reviewed by Anders Carlsson.

* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::readEventHandler): Check for a broken pipe
whenever we call ::PeekNamedPipe.

2010-07-21 Adam Roben <aroben@apple.com>

Teach CoreIPC how to handle messages that are larger than the pipe's
@@ -124,6 +124,10 @@ void Connection::readEventHandler()
DWORD bytesToRead = 0;
if (!::PeekNamedPipe(m_connectionPipe, 0, 0, 0, 0, &bytesToRead)) {
DWORD error = ::GetLastError();
if (error == ERROR_BROKEN_PIPE) {
connectionDidClose();
return;
}
ASSERT_NOT_REACHED();
return;
}
@@ -174,6 +178,10 @@ void Connection::readEventHandler()
DWORD bytesToRead = 0;
if (!::PeekNamedPipe(m_connectionPipe, 0, 0, 0, 0, &bytesToRead)) {
DWORD error = ::GetLastError();
if (error == ERROR_BROKEN_PIPE) {
connectionDidClose();
return;
}
ASSERT_NOT_REACHED();
}
if (!bytesToRead) {

0 comments on commit 1201b81

Please sign in to comment.