Chromium Code Reviews| Index: third_party/WebKit/Source/core/workers/WorkerThread.h |
| diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.h b/third_party/WebKit/Source/core/workers/WorkerThread.h |
| index d8da5e4a5df375042379c522d010894562c4f527..2c1cfe581b2521a0b56fcbbb19ba15cb16b381a2 100644 |
| --- a/third_party/WebKit/Source/core/workers/WorkerThread.h |
| +++ b/third_party/WebKit/Source/core/workers/WorkerThread.h |
| @@ -31,8 +31,8 @@ |
| #include "core/CoreExport.h" |
| #include "core/frame/csp/ContentSecurityPolicy.h" |
| +#include "core/loader/ThreadableLoadingContext.h" |
| #include "core/workers/ParentFrameTaskRunners.h" |
| -#include "core/workers/WorkerLoaderProxy.h" |
| #include "core/workers/WorkerThreadLifecycleObserver.h" |
| #include "platform/LifecycleNotifier.h" |
| #include "platform/WaitableEvent.h" |
| @@ -128,10 +128,8 @@ class CORE_EXPORT WorkerThread : public WebThread::TaskObserver { |
| bool IsCurrentThread(); |
| - WorkerLoaderProxy* GetWorkerLoaderProxy() const { |
| - RELEASE_ASSERT(worker_loader_proxy_); |
| - return worker_loader_proxy_.Get(); |
| - } |
| + // Called on the worker thread. |
| + ThreadableLoadingContext* GetLoadingContext(); |
| WorkerReportingProxy& GetWorkerReportingProxy() const { |
| return worker_reporting_proxy_; |
| @@ -178,7 +176,7 @@ class CORE_EXPORT WorkerThread : public WebThread::TaskObserver { |
| } |
| protected: |
| - WorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&); |
| + WorkerThread(ThreadableLoadingContext*, WorkerReportingProxy&); |
| // Factory method for creating a new worker context for the thread. |
| // Called on the worker thread. |
| @@ -288,7 +286,9 @@ class CORE_EXPORT WorkerThread : public WebThread::TaskObserver { |
| std::unique_ptr<InspectorTaskRunner> inspector_task_runner_; |
| - RefPtr<WorkerLoaderProxy> worker_loader_proxy_; |
| + // Set on the main thread and accessed on the worker thread. |
|
haraken
2017/04/25 16:53:43
Set => Created
BTW it is unsafe to pass around a
keishi
2017/04/25 23:42:02
The GetLoadingContext() and loading_context_.Clear
kinuko
2017/04/26 02:57:18
It'd be probably also good to rephrase this commen
nhiroki
2017/05/29 04:20:24
Done.
|
| + CrossThreadPersistent<ThreadableLoadingContext> loading_context_; |
| + |
| WorkerReportingProxy& worker_reporting_proxy_; |
| CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_; |