| Index: Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp
|
| diff --git a/Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp b/Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp
|
| index d6b7bbb3bcc0bd18589976664745620f65b5e849..61df64f265d152493cac156fc2cff3bdafa36987 100644
|
| --- a/Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp
|
| +++ b/Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp
|
| @@ -227,7 +227,12 @@ void WorkerThreadableWebSocketChannel::resume()
|
| m_bridge->resume();
|
| }
|
|
|
| -WorkerThreadableWebSocketChannel::Peer::Peer(PassRefPtr<WeakReference<Peer> > reference, PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ExecutionContext* context, const String& sourceURL, unsigned lineNumber, PassOwnPtr<ThreadableWebSocketChannelSyncHelper> syncHelper)
|
| +void WorkerThreadableWebSocketChannel::trace(Visitor* visitor)
|
| +{
|
| + visitor->trace(m_workerClientWrapper);
|
| +}
|
| +
|
| +WorkerThreadableWebSocketChannel::Peer::Peer(PassRefPtr<WeakReference<Peer> > reference, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ExecutionContext* context, const String& sourceURL, unsigned lineNumber, PassOwnPtr<ThreadableWebSocketChannelSyncHelper> syncHelper)
|
| : m_workerClientWrapper(clientWrapper)
|
| , m_loaderProxy(loaderProxy)
|
| , m_mainWebSocketChannel(nullptr)
|
| @@ -254,7 +259,7 @@ WorkerThreadableWebSocketChannel::Peer::~Peer()
|
| m_mainWebSocketChannel->disconnect();
|
| }
|
|
|
| -void WorkerThreadableWebSocketChannel::Peer::initialize(ExecutionContext* context, PassRefPtr<WeakReference<Peer> > reference, WorkerLoaderProxy* loaderProxy, PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& sourceURLAtConnection, unsigned lineNumberAtConnection, PassOwnPtr<ThreadableWebSocketChannelSyncHelper> syncHelper)
|
| +void WorkerThreadableWebSocketChannel::Peer::initialize(ExecutionContext* context, PassRefPtr<WeakReference<Peer> > reference, WorkerLoaderProxy* loaderProxy, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& sourceURLAtConnection, unsigned lineNumberAtConnection, PassOwnPtr<ThreadableWebSocketChannelSyncHelper> syncHelper)
|
| {
|
| // The caller must call destroy() to free the peer.
|
| new Peer(reference, clientWrapper, *loaderProxy, context, sourceURLAtConnection, lineNumberAtConnection, syncHelper);
|
| @@ -368,7 +373,7 @@ void WorkerThreadableWebSocketChannel::Peer::resume()
|
| m_mainWebSocketChannel->resume();
|
| }
|
|
|
| -static void workerGlobalScopeDidConnect(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& subprotocol, const String& extensions)
|
| +static void workerGlobalScopeDidConnect(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& subprotocol, const String& extensions)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->setSubprotocol(subprotocol);
|
| @@ -382,7 +387,7 @@ void WorkerThreadableWebSocketChannel::Peer::didConnect()
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidConnect, m_workerClientWrapper, m_mainWebSocketChannel->subprotocol(), m_mainWebSocketChannel->extensions()));
|
| }
|
|
|
| -static void workerGlobalScopeDidReceiveMessage(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& message)
|
| +static void workerGlobalScopeDidReceiveMessage(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& message)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didReceiveMessage(message);
|
| @@ -394,7 +399,7 @@ void WorkerThreadableWebSocketChannel::Peer::didReceiveMessage(const String& mes
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidReceiveMessage, m_workerClientWrapper, message));
|
| }
|
|
|
| -static void workerGlobalScopeDidReceiveBinaryData(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, PassOwnPtr<Vector<char> > binaryData)
|
| +static void workerGlobalScopeDidReceiveBinaryData(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, PassOwnPtr<Vector<char> > binaryData)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didReceiveBinaryData(binaryData);
|
| @@ -406,7 +411,7 @@ void WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData(PassOwnPtr<Vec
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidReceiveBinaryData, m_workerClientWrapper, binaryData));
|
| }
|
|
|
| -static void workerGlobalScopeDidUpdateBufferedAmount(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long bufferedAmount)
|
| +static void workerGlobalScopeDidUpdateBufferedAmount(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long bufferedAmount)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didUpdateBufferedAmount(bufferedAmount);
|
| @@ -418,7 +423,7 @@ void WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount(unsigned lo
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidUpdateBufferedAmount, m_workerClientWrapper, bufferedAmount));
|
| }
|
|
|
| -static void workerGlobalScopeDidStartClosingHandshake(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
|
| +static void workerGlobalScopeDidStartClosingHandshake(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didStartClosingHandshake();
|
| @@ -430,7 +435,7 @@ void WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake()
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidStartClosingHandshake, m_workerClientWrapper));
|
| }
|
|
|
| -static void workerGlobalScopeDidClose(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
|
| +static void workerGlobalScopeDidClose(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didClose(unhandledBufferedAmount, closingHandshakeCompletion, code, reason);
|
| @@ -443,7 +448,7 @@ void WorkerThreadableWebSocketChannel::Peer::didClose(unsigned long unhandledBuf
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidClose, m_workerClientWrapper, unhandledBufferedAmount, closingHandshakeCompletion, code, reason));
|
| }
|
|
|
| -static void workerGlobalScopeDidReceiveMessageError(ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
|
| +static void workerGlobalScopeDidReceiveMessageError(ExecutionContext* context, PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
|
| {
|
| ASSERT_UNUSED(context, context->isWorkerGlobalScope());
|
| workerClientWrapper->didReceiveMessageError();
|
| @@ -455,7 +460,7 @@ void WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError()
|
| m_loaderProxy.postTaskToWorkerGlobalScope(createCallbackTask(&workerGlobalScopeDidReceiveMessageError, m_workerClientWrapper));
|
| }
|
|
|
| -WorkerThreadableWebSocketChannel::Bridge::Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, WorkerGlobalScope& workerGlobalScope)
|
| +WorkerThreadableWebSocketChannel::Bridge::Bridge(PassRefPtrWillBeRawPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, WorkerGlobalScope& workerGlobalScope)
|
| : m_workerClientWrapper(workerClientWrapper)
|
| , m_workerGlobalScope(workerGlobalScope)
|
| , m_loaderProxy(m_workerGlobalScope->thread()->workerLoaderProxy())
|
|
|