Changeset 70637 in webkit
- Timestamp:
- Oct 27, 2010 5:07:36 AM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70635 r70637 1 2010-10-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] WebKit2 UI process crashes if web process crashes 6 https://bugs.webkit.org/show_bug.cgi?id=48400 7 8 Check the success of socket write operations. 9 Avoids crashing the UI process if web process has crashed. 10 Qt socket code segfaults when write is called for a socket 11 that has had an error. 12 13 * Platform/CoreIPC/qt/ConnectionQt.cpp: 14 (CoreIPC::Connection::platformInvalidate): 15 Reset m_socket after deletion. 16 17 (CoreIPC::Connection::sendOutgoingMessage): 18 Check error status of write operations and 19 invalidate socket if writes fail. 20 1 21 2010-10-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> 2 22 -
trunk/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp
r70635 r70637 52 52 { 53 53 delete m_socket; 54 m_socket = 0; 54 55 } 55 56 … … 120 121 // Write message size first 121 122 // FIXME: Should just do a single write. 122 m_socket->write(reinterpret_cast<char*>(&bufferSize), sizeof(bufferSize)); 123 qint64 bytesWrittenForSize = m_socket->write(reinterpret_cast<char*>(&bufferSize), sizeof(bufferSize)); 124 if (bytesWrittenForSize != sizeof(bufferSize)) { 125 connectionDidClose(); 126 return false; 127 } 123 128 124 qint64 bytesWritten = m_socket->write(reinterpret_cast<char*>(arguments->buffer()), arguments->bufferSize()); 129 qint64 bytesWrittenForBuffer = m_socket->write(reinterpret_cast<char*>(arguments->buffer()), arguments->bufferSize()); 130 if (bytesWrittenForBuffer != arguments->bufferSize()) { 131 connectionDidClose(); 132 return false; 133 } 125 134 126 ASSERT_UNUSED(bytesWritten, bytesWritten == arguments->bufferSize());127 135 return true; 128 136 }
Note: See TracChangeset
for help on using the changeset viewer.