[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