Chromium Code Reviews| Index: third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h |
| diff --git a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h |
| index 09a841d57e6bf69c930f57b84822ea9812728017..3aeea1f09eb5d22dadfa8382431b3b5fa6e7ec57 100644 |
| --- a/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h |
| +++ b/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.h |
| @@ -8,13 +8,13 @@ |
| #include "core/CoreExport.h" |
| #include "core/frame/UseCounter.h" |
| #include "core/inspector/ConsoleTypes.h" |
| +#include "core/workers/ParentFrameTaskRunners.h" |
| #include "core/workers/WorkerLoaderProxy.h" |
| #include "wtf/Forward.h" |
| namespace blink { |
| class ExecutionContext; |
| -class ParentFrameTaskRunners; |
| class SourceLocation; |
| class WorkerInspectorProxy; |
| class WorkerLoaderProxy; |
| @@ -44,10 +44,12 @@ class CORE_EXPORT ThreadedMessagingProxyBase |
| // 'virtual' for testing. |
| virtual void workerThreadTerminated(); |
| + // Accessed from both the parent thread and the worker. |
| ExecutionContext* getExecutionContext() const { |
| return m_executionContext.get(); |
| } |
| + // Accessed from both the parent thread and the worker. |
| ParentFrameTaskRunners* getParentFrameTaskRunners() { |
| return m_parentFrameTaskRunners.get(); |
| } |
| @@ -68,7 +70,7 @@ class CORE_EXPORT ThreadedMessagingProxyBase |
| bool askedToTerminate() const { return m_askedToTerminate; } |
| PassRefPtr<WorkerLoaderProxy> loaderProxy() { return m_loaderProxy; } |
| - WorkerInspectorProxy* workerInspectorProxy() { |
| + WorkerInspectorProxy* workerInspectorProxy() const { |
| return m_workerInspectorProxy.get(); |
| } |
| @@ -90,9 +92,11 @@ class CORE_EXPORT ThreadedMessagingProxyBase |
| void parentObjectDestroyedInternal(); |
| - Persistent<ExecutionContext> m_executionContext; |
| + // Accessed cross-thread when worker thread posts tasks to the parent. |
| + CrossThreadPersistent<ExecutionContext> m_executionContext; |
|
haraken
2017/02/20 23:57:18
Ditto.
|
| Persistent<WorkerInspectorProxy> m_workerInspectorProxy; |
| - Persistent<ParentFrameTaskRunners> m_parentFrameTaskRunners; |
| + // Accessed cross-thread when worker thread posts tasks to the parent. |
| + CrossThreadPersistent<ParentFrameTaskRunners> m_parentFrameTaskRunners; |
| std::unique_ptr<WorkerThread> m_workerThread; |