Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: Source/core/workers/WorkerMessagingProxy.h

Issue 887463003: Turn WorkerLoaderProxy into a threadsafe, ref-counted object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clarify WorkerLoaderProxyProvider's obligations on shutdown Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/workers/WorkerLoaderProxy.cpp ('k') | Source/core/workers/WorkerMessagingProxy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerMessagingProxy.h
diff --git a/Source/core/workers/WorkerMessagingProxy.h b/Source/core/workers/WorkerMessagingProxy.h
index 8299e04804f0492682508ac067a977b9d6ea823a..bace41ad093c60865366dcc47d3e175ddce6663b 100644
--- a/Source/core/workers/WorkerMessagingProxy.h
+++ b/Source/core/workers/WorkerMessagingProxy.h
@@ -46,8 +46,11 @@ class Worker;
class WorkerClients;
class WorkerInspectorProxy;
-class WorkerMessagingProxy final : public WorkerGlobalScopeProxy, public WorkerLoaderProxy {
- WTF_MAKE_NONCOPYABLE(WorkerMessagingProxy); WTF_MAKE_FAST_ALLOCATED;
+class WorkerMessagingProxy final
+ : public WorkerGlobalScopeProxy
+ , private WorkerLoaderProxyProvider {
+ WTF_MAKE_NONCOPYABLE(WorkerMessagingProxy);
+ WTF_MAKE_FAST_ALLOCATED;
public:
WorkerMessagingProxy(Worker*, PassOwnPtrWillBeRawPtr<WorkerClients>);
@@ -72,12 +75,6 @@ public:
void workerGlobalScopeClosed();
void workerThreadTerminated();
- // Implementation of WorkerLoaderProxy.
- // These methods are called on different threads to schedule loading
- // requests and to send callbacks back to WorkerGlobalScope.
- virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override;
- virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override;
-
void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>);
protected:
@@ -87,6 +84,12 @@ private:
static void workerObjectDestroyedInternal(ExecutionContext*, WorkerMessagingProxy*);
void terminateInternally();
+ // WorkerLoaderProxyProvider
+ // These methods are called on different threads to schedule loading
+ // requests and to send callbacks back to WorkerGlobalScope.
+ virtual void postTaskToLoader(PassOwnPtr<ExecutionContextTask>) override;
+ virtual bool postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask>) override;
+
RefPtrWillBePersistent<ExecutionContext> m_executionContext;
OwnPtr<WorkerObjectProxy> m_workerObjectProxy;
Worker* m_workerObject;
@@ -102,6 +105,8 @@ private:
OwnPtr<WorkerInspectorProxy> m_workerInspectorProxy;
OwnPtrWillBePersistent<WorkerClients> m_workerClients;
+
+ RefPtr<WorkerLoaderProxy> m_loaderProxy;
};
} // namespace blink
« no previous file with comments | « Source/core/workers/WorkerLoaderProxy.cpp ('k') | Source/core/workers/WorkerMessagingProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698