Index: Source/modules/websockets/WorkerThreadableWebSocketChannel.h |
diff --git a/Source/modules/websockets/WorkerThreadableWebSocketChannel.h b/Source/modules/websockets/WorkerThreadableWebSocketChannel.h |
index e22c3ace907d7e36f76ad676427cde700b023d92..053fe4d9bf4598075993777530419fd5bb0bc705 100644 |
--- a/Source/modules/websockets/WorkerThreadableWebSocketChannel.h |
+++ b/Source/modules/websockets/WorkerThreadableWebSocketChannel.h |
@@ -31,6 +31,7 @@ |
#ifndef WorkerThreadableWebSocketChannel_h |
#define WorkerThreadableWebSocketChannel_h |
+#include "core/dom/ExecutionContextTask.h" |
#include "core/frame/ConsoleTypes.h" |
#include "core/workers/WorkerGlobalScope.h" |
#include "modules/websockets/WebSocketChannel.h" |
@@ -84,8 +85,6 @@ public: |
virtual void suspend() OVERRIDE; |
virtual void resume() OVERRIDE; |
- virtual void trace(Visitor*) OVERRIDE; |
- |
// Generated by the bridge. The Peer is destructed by an async call from |
// Bridge, and may outlive the bridge. All methods of this class must |
// be called on the main thread. |
@@ -133,7 +132,7 @@ private: |
// Bridge for Peer. Running on the worker thread. |
class Bridge : public RefCounted<Bridge> { |
public: |
- static PassRefPtr<Bridge> create(PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, PassRefPtrWillBeRawPtr<WorkerGlobalScope> workerGlobalScope) |
+ static PassRefPtr<Bridge> create(PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, WorkerGlobalScope& workerGlobalScope) |
{ |
return adoptRef(new Bridge(workerClientWrapper, workerGlobalScope)); |
} |
@@ -153,7 +152,7 @@ private: |
void resume(); |
private: |
- Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtrWillBeRawPtr<WorkerGlobalScope>); |
+ Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerGlobalScope&); |
static void setWebSocketChannel(ExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>); |
@@ -161,10 +160,12 @@ private: |
void clearClientWrapper(); |
// Returns false if shutdown event is received before method completion. |
- bool waitForMethodCompletion(); |
+ bool waitForMethodCompletion(PassOwnPtr<ExecutionContextTask>); |
void terminatePeer(); |
+ bool hasTerminatedPeer() { return !m_syncHelper; } |
+ |
const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; |
RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
WorkerLoaderProxy& m_loaderProxy; |
@@ -174,7 +175,6 @@ private: |
WorkerThreadableWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*, const String& sourceURL, unsigned lineNumber); |
- RefPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope; |
const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; |
RefPtr<Bridge> m_bridge; |
String m_sourceURLAtConnection; |