WebSocket: Pass the value of useHixie76Protocol flag to WebSocket object
authoryutak@chromium.org <yutak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jul 2011 12:21:04 +0000 (12:21 +0000)
committeryutak@chromium.org <yutak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Jul 2011 12:21:04 +0000 (12:21 +0000)
commit7649d8eec5f514001e1bfe3ba36c3defdd2d7c99
tree91439d886f7ad4ea8a0e977ec8d0766ec926f7d7
parent651726beae36f71b9c6b7453e523a1f6ce48c01c
WebSocket: Pass the value of useHixie76Protocol flag to WebSocket object
https://bugs.webkit.org/show_bug.cgi?id=65250

Reviewed by Alexey Proskuryakov.

Add useHixie76Protocol() method to WebSocketChannel and its family. To implement hybi-specific
attributes in WebSocket object, WebSocket class needs to be able to get the value of
useHixie76Protocol flag of WebSocketChannel.

If the WebSocket object is created in a worker thread, the flag value must be obtained from
WebSocketChannel which resides in the loader thread (through WorkerThreadableWebSocketChannel).
Since the value does not change after creation of WebSocketChannel, it can be cached in
the worker thread.

There is no change in behavior, thus no new tests.

* websockets/ThreadableWebSocketChannel.h:
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::useHixie76Protocol):
(WebCore::ThreadableWebSocketChannelClientWrapper::setUseHixie76Protocol):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::useHixie76Protocol):
* websockets/WebSocketChannel.h:
* websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::useHixie76Protocol):
(WebCore::WorkerThreadableWebSocketChannel::Peer::useHixie76Protocol):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
* websockets/WorkerThreadableWebSocketChannel.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/websockets/ThreadableWebSocketChannel.h
Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp
Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
Source/WebCore/websockets/WebSocketChannel.cpp
Source/WebCore/websockets/WebSocketChannel.h
Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
Source/WebCore/websockets/WorkerThreadableWebSocketChannel.h