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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:00:53 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ea2a60752b72ac2fe8fbc321ebe2fbee82492ca7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 12:07:36 2010 +0000

    2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen at nokia.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] WebKit2 UI process crashes if web process crashes
            https://bugs.webkit.org/show_bug.cgi?id=48400
    
            Check the success of socket write operations.
            Avoids crashing the UI process if web process has crashed.
            Qt socket code segfaults when write is called for a socket
            that has had an error.
    
            * Platform/CoreIPC/qt/ConnectionQt.cpp:
            (CoreIPC::Connection::platformInvalidate):
            Reset m_socket after deletion.
    
            (CoreIPC::Connection::sendOutgoingMessage):
            Check error status of write operations and
            invalidate socket if writes fail.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70637 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 331b407..f94c443 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,26 @@
 
         Reviewed by Andreas Kling.
 
+        [Qt] WebKit2 UI process crashes if web process crashes
+        https://bugs.webkit.org/show_bug.cgi?id=48400
+
+        Check the success of socket write operations.
+        Avoids crashing the UI process if web process has crashed.
+        Qt socket code segfaults when write is called for a socket
+        that has had an error.
+
+        * Platform/CoreIPC/qt/ConnectionQt.cpp:
+        (CoreIPC::Connection::platformInvalidate):
+        Reset m_socket after deletion.
+
+        (CoreIPC::Connection::sendOutgoingMessage):
+        Check error status of write operations and
+        invalidate socket if writes fail.
+
+2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen at nokia.com>
+
+        Reviewed by Andreas Kling.
+
         [Qt] Type mismatch while serializing/deserializing message id size
         https://bugs.webkit.org/show_bug.cgi?id=48401
 
diff --git a/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp b/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
index edcfc7a..6e7642a 100644
--- a/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
+++ b/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
@@ -51,6 +51,7 @@ void Connection::platformInitialize(Identifier identifier)
 void Connection::platformInvalidate()
 {
     delete m_socket;
+    m_socket = 0;
 }
 
 void Connection::readyReadHandler()
@@ -119,11 +120,18 @@ bool Connection::sendOutgoingMessage(MessageID messageID, PassOwnPtr<ArgumentEnc
 
     // Write message size first
     // FIXME: Should  just do a single write.
-    m_socket->write(reinterpret_cast<char*>(&bufferSize), sizeof(bufferSize));
+    qint64 bytesWrittenForSize = m_socket->write(reinterpret_cast<char*>(&bufferSize), sizeof(bufferSize));
+    if (bytesWrittenForSize != sizeof(bufferSize)) {
+        connectionDidClose();
+        return false;
+    }
 
-    qint64 bytesWritten = m_socket->write(reinterpret_cast<char*>(arguments->buffer()), arguments->bufferSize());
+    qint64 bytesWrittenForBuffer = m_socket->write(reinterpret_cast<char*>(arguments->buffer()), arguments->bufferSize());
+    if (bytesWrittenForBuffer != arguments->bufferSize()) {
+        connectionDidClose();
+        return false;
+    }
 
-    ASSERT_UNUSED(bytesWritten, bytesWritten == arguments->bufferSize());
     return true;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list