[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 12:42:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1238f4291748e9593fc04cab994bb5db2a4793d5
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 17:15:04 2010 +0000

    Handle ERROR_IO_INCOMPLETE more correctly in Connection
    
    We still don't know exactly why we're getting this error, but at least
    we can do something sensible when we do.
    
    Fixes <http://webkit.org/b/44776> Occasional crash in
    Connection::readEventHandler or assertion failure in
    Connection::writeEventHandler due to ERROR_IO_INCOMPLETE
    
    Reviewed by Sam Weinig.
    
    * Platform/CoreIPC/win/ConnectionWin.cpp:
    (CoreIPC::Connection::readEventHandler): Bail out of this function
    entirely when we get ERROR_IO_INCOMPLETE. We'll get called back later
    when the read completes. Continuing in the function at this point
    would cause us to treat an incomplete read as a complete one, leading
    to a crash. Added an assertion to make the crash more understandable
    in the future.
    (CoreIPC::Connection::writeEventHandler): Bail out when we get
    ERROR_IO_INCOMPLETE. We'll get called back later when the write
    completes.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 852f70a..f82a246 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,29 @@
 2010-08-27  Adam Roben  <aroben at apple.com>
 
+        Handle ERROR_IO_INCOMPLETE more correctly in Connection
+
+        We still don't know exactly why we're getting this error, but at least
+        we can do something sensible when we do.
+
+        Fixes <http://webkit.org/b/44776> Occasional crash in
+        Connection::readEventHandler or assertion failure in
+        Connection::writeEventHandler due to ERROR_IO_INCOMPLETE
+
+        Reviewed by Sam Weinig.
+
+        * Platform/CoreIPC/win/ConnectionWin.cpp:
+        (CoreIPC::Connection::readEventHandler): Bail out of this function
+        entirely when we get ERROR_IO_INCOMPLETE. We'll get called back later
+        when the read completes. Continuing in the function at this point
+        would cause us to treat an incomplete read as a complete one, leading
+        to a crash. Added an assertion to make the crash more understandable
+        in the future.
+        (CoreIPC::Connection::writeEventHandler): Bail out when we get
+        ERROR_IO_INCOMPLETE. We'll get called back later when the write
+        completes.
+
+2010-08-27  Adam Roben  <aroben at apple.com>
+
         Make the web process pause on launch when the
         WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set
 
diff --git a/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp b/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
index 136d0f3..f1cc46c 100644
--- a/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
+++ b/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
@@ -153,7 +153,7 @@ void Connection::readEventHandler()
 
             // FIXME: We should figure out why we're getting this error.
             case ERROR_IO_INCOMPLETE:
-                break;
+                return;
             default:
                 ASSERT_NOT_REACHED();
             }
@@ -168,6 +168,7 @@ void Connection::readEventHandler()
             // either when receiving ERROR_MORE_DATA from ::GetOverlappedResult above or when
             // ::PeekNamedPipe tells us the size below. We never set m_readBuffer to a size larger
             // than the message.
+            ASSERT(m_readBuffer.size() >= sizeof(MessageID));
             size_t realBufferSize = m_readBuffer.size() - sizeof(MessageID);
 
             unsigned messageID = *reinterpret_cast<unsigned*>(m_readBuffer.data() + realBufferSize);
@@ -233,6 +234,10 @@ void Connection::writeEventHandler()
     DWORD numberOfBytesWritten = 0;
     if (!::GetOverlappedResult(m_connectionPipe, &m_writeState, &numberOfBytesWritten, FALSE)) {
         DWORD error = ::GetLastError();
+        if (error == ERROR_IO_INCOMPLETE) {
+            // FIXME: We should figure out why we're getting this error.
+            return;
+        }
         ASSERT_NOT_REACHED();
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list