Title: [107085] trunk/Source/WebKit/qt
- Revision
- 107085
- Author
- commit-qu...@webkit.org
- Date
- 2012-02-08 07:11:37 -0800 (Wed, 08 Feb 2012)
Log Message
Remote web inspector reentrancy fixes
https://bugs.webkit.org/show_bug.cgi?id=77022
Patch by Leo Franchi <lfran...@kde.org> on 2012-02-08
Reviewed by Joseph Pecoraro.
* WebCoreSupport/InspectorServerQt.cpp:
(WebCore::InspectorServerRequestHandlerQt::tcpReadyRead):
(WebCore::InspectorServerRequestHandlerQt::webSocketReadyRead):
Modified Paths
Diff
Modified: trunk/Source/WebKit/qt/ChangeLog (107084 => 107085)
--- trunk/Source/WebKit/qt/ChangeLog 2012-02-08 14:57:37 UTC (rev 107084)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-02-08 15:11:37 UTC (rev 107085)
@@ -1,3 +1,14 @@
+2012-02-08 Leo Franchi <lfran...@kde.org>
+
+ Remote web inspector reentrancy fixes
+ https://bugs.webkit.org/show_bug.cgi?id=77022
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebCoreSupport/InspectorServerQt.cpp:
+ (WebCore::InspectorServerRequestHandlerQt::tcpReadyRead):
+ (WebCore::InspectorServerRequestHandlerQt::webSocketReadyRead):
+
2012-02-06 Caio Marcelo de Oliveira Filho <caio.olive...@openbossa.org>
Provide more attribute methods in Element
Modified: trunk/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp (107084 => 107085)
--- trunk/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp 2012-02-08 14:57:37 UTC (rev 107084)
+++ trunk/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp 2012-02-08 15:11:37 UTC (rev 107085)
@@ -209,7 +209,7 @@
// switch to websocket-style WebSocketService messaging
if (m_tcpConnection) {
m_tcpConnection->disconnect(SIGNAL(readyRead()));
- connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(webSocketReadyRead()));
+ connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(webSocketReadyRead()), Qt::QueuedConnection);
QByteArray key3 = m_tcpConnection->read(8);
@@ -357,6 +357,10 @@
QByteArray payload = m_data.mid(1, length);
+ // Remove this WebSocket message from m_data (payload, start-of-frame byte, end-of-frame byte).
+ // Truncate data before delivering message in case of re-entrancy.
+ m_data = m_data.mid(length + 2);
+
#if ENABLE(INSPECTOR)
if (m_inspectorClient) {
InspectorController* inspectorController = m_inspectorClient->m_inspectedWebPage->d->page->inspectorController();
@@ -364,8 +368,6 @@
}
#endif
- // Remove this WebSocket message from m_data (payload, start-of-frame byte, end-of-frame byte).
- m_data = m_data.mid(length + 2);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes