| Index: Source/web/WebSocketImpl.cpp
|
| diff --git a/Source/web/WebSocketImpl.cpp b/Source/web/WebSocketImpl.cpp
|
| index ba573540a48967f577296d54eec7ee67fd8c4d54..d78b69964e511fd4b2981b35042615f68d9287b4 100644
|
| --- a/Source/web/WebSocketImpl.cpp
|
| +++ b/Source/web/WebSocketImpl.cpp
|
| @@ -41,6 +41,7 @@
|
| #include "public/platform/WebString.h"
|
| #include "public/platform/WebURL.h"
|
| #include "public/web/WebDocument.h"
|
| +#include "web/WebSocketChannelClientProxy.h"
|
| #include "wtf/ArrayBuffer.h"
|
| #include "wtf/text/CString.h"
|
| #include "wtf/text/WTFString.h"
|
| @@ -51,6 +52,7 @@ namespace blink {
|
|
|
| WebSocketImpl::WebSocketImpl(const WebDocument& document, WebSocketClient* client)
|
| : m_client(client)
|
| + , m_channelProxy(WebSocketChannelClientProxy::create(this))
|
| , m_binaryType(BinaryTypeBlob)
|
| , m_isClosingOrClosed(false)
|
| , m_bufferedAmount(0)
|
| @@ -58,17 +60,15 @@ WebSocketImpl::WebSocketImpl(const WebDocument& document, WebSocketClient* clien
|
| {
|
| RefPtrWillBeRawPtr<Document> coreDocument = PassRefPtrWillBeRawPtr<Document>(document);
|
| if (RuntimeEnabledFeatures::experimentalWebSocketEnabled()) {
|
| - m_private = NewWebSocketChannelImpl::create(coreDocument.get(), this);
|
| + m_private = NewWebSocketChannelImpl::create(coreDocument.get(), m_channelProxy.get());
|
| } else {
|
| - m_private = MainThreadWebSocketChannel::create(coreDocument.get(), this);
|
| + m_private = MainThreadWebSocketChannel::create(coreDocument.get(), m_channelProxy.get());
|
| }
|
| }
|
|
|
| WebSocketImpl::~WebSocketImpl()
|
| {
|
| -#if !ENABLE(OILPAN)
|
| m_private->disconnect();
|
| -#endif
|
| }
|
|
|
| WebSocket::BinaryType WebSocketImpl::binaryType() const
|
| @@ -201,7 +201,7 @@ void WebSocketImpl::didStartClosingHandshake()
|
| m_client->didStartClosingHandshake();
|
| }
|
|
|
| -void WebSocketImpl::didClose(ClosingHandshakeCompletionStatus status, unsigned short code, const String& reason)
|
| +void WebSocketImpl::didClose(WebSocketChannelClient::ClosingHandshakeCompletionStatus status, unsigned short code, const String& reason)
|
| {
|
| m_isClosingOrClosed = true;
|
| m_client->didClose(static_cast<WebSocketClient::ClosingHandshakeCompletionStatus>(status), code, WebString(reason));
|
| @@ -210,10 +210,4 @@ void WebSocketImpl::didClose(ClosingHandshakeCompletionStatus status, unsigned s
|
| m_client->didClose(m_bufferedAmount - m_bufferedAmountAfterClose, static_cast<WebSocketClient::ClosingHandshakeCompletionStatus>(status), code, WebString(reason));
|
| }
|
|
|
| -void WebSocketImpl::trace(blink::Visitor* visitor)
|
| -{
|
| - visitor->trace(m_private);
|
| - blink::WebSocketChannelClient::trace(visitor);
|
| -}
|
| -
|
| } // namespace blink
|
|
|