Skip to content
  • bashi@chromium.org's avatar
    [WebSocket] Introduce ThreadableWebSocketChannel::SendResult · 73b6cbb6
    bashi@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=80356
    
    Reviewed by Kent Tamura.
    
    Source/WebCore:
    
    Introduced ThreadableWebSocketChannel::SendResult type so that
    WebSocketChannel can pass the validation result.
    
    No new test. No changes in behavior.
    
    * Modules/websockets/ThreadableWebSocketChannel.h: Added SendResult.
    * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
    (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
    (WebCore::ThreadableWebSocketChannelClientWrapper::sendRequestResult): Use ThreadableWebSocketChannel::SendResult instead of bool.
    (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult): Ditto.
    * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
    (ThreadableWebSocketChannelClientWrapper):
    * Modules/websockets/WebSocketChannel.cpp:
    (WebCore::WebSocketChannel::send): Use ThreadableWebSocketChannel::SendResult instead of bool. Pass Cstring to enqueTextFrame instead of String.
    (WebCore::WebSocketChannel::enqueueTextFrame): Ditto.
    (WebCore::WebSocketChannel::processOutgoingFrameQueue): Ditto.
    * Modules/websockets/WebSocketChannel.h:
    (WebSocketChannel):
    (QueuedFrame): Changed the type of stringData from String to CString.
    * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
    (WebCore::WorkerThreadableWebSocketChannel::send): Use ThreadableWebSocketChannel::SendResult instead of bool.
    (WebCore::workerContextDidSend): Ditto.
    (WebCore::WorkerThreadableWebSocketChannel::Peer::send): Ditto.
    (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
    * Modules/websockets/WorkerThreadableWebSocketChannel.h:
    (WorkerThreadableWebSocketChannel): ditto.
    (Bridge): Ditto.
    
    Source/WebKit/chromium:
    
    * src/WebSocketImpl.cpp:
    (WebKit::WebSocketImpl::sendText): Checks whether the return value of send() is ThreadableWebSocketChannel::SendSuccess.
    (WebKit::WebSocketImpl::sendArrayBuffer): Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    73b6cbb6