[Qt] Fix the remote inspector loading problems on Mac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 13:24:31 +0000 (13:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 13:24:31 +0000 (13:24 +0000)
commitbecda35df4a15cb3933a8b95be80ebfc6cf02635
tree664fbdd53e0c8579fa47d2c326925ea09f1e2165
parentc5794954bd977fcccae3153fcefbdc98f914fba8
[Qt] Fix the remote inspector loading problems on Mac
https://bugs.webkit.org/show_bug.cgi?id=89747

Patch by Jocelyn Turcotte <turcotte.j@gmail.com> on 2012-06-22
Reviewed by Simon Hausmann.

Source/WebCore:

Make sure that the state of a SocketStreamHandle is set properly
when created from an existing QTcpSocket.

This fixes the inspectorserver Qt api auto test on Mac.

* platform/network/qt/SocketStreamHandleQt.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):

Source/WebKit2:

Reverse the creation order of the inter-dependent WebSocketServerConnection
and SocketStreamHandle to make sure that the later has a client properly
set on construction.

This is to work around the assert on m_state in SocketStreamHandle::setClient.

* UIProcess/InspectorServer/WebSocketServer.cpp:
(WebKit::WebSocketServer::didAcceptConnection):
* UIProcess/InspectorServer/WebSocketServer.h:
(WebKit::WebSocketServer::client):
(WebSocketServer):
* UIProcess/InspectorServer/WebSocketServerConnection.cpp:
(WebKit::WebSocketServerConnection::WebSocketServerConnection):
(WebKit::WebSocketServerConnection::setSocketHandle):
(WebKit):
* UIProcess/InspectorServer/WebSocketServerConnection.h:
(WebSocketServerConnection):
* UIProcess/InspectorServer/qt/WebSocketServerQt.cpp:
(WebKit::QtTcpServerHandler::handleNewConnection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp
Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h
Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.h
Source/WebKit2/UIProcess/InspectorServer/qt/WebSocketServerQt.cpp