| Index: third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
|
| diff --git a/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h b/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
|
| index 5951d8b3ac153689a3d84c96e9f2e7041965d52f..770719fe2b78f6f1ea953bd73d5768a7a0f5ffa8 100644
|
| --- a/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
|
| +++ b/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h
|
| @@ -62,11 +62,12 @@ class CORE_EXPORT WorkerLoaderProxyProvider {
|
| virtual ~WorkerLoaderProxyProvider() {}
|
|
|
| // Posts a task to the thread which runs the loading code (normally, the main
|
| - // thread).
|
| + // thread). This must be called from a worker thread.
|
| virtual void postTaskToLoader(const WebTraceLocation&,
|
| std::unique_ptr<ExecutionContextTask>) = 0;
|
|
|
| - // Posts callbacks from loading code to the WorkerGlobalScope.
|
| + // Posts callbacks from loading code to the WorkerGlobalScope. This must be
|
| + // called from the main thread.
|
| virtual void postTaskToWorkerGlobalScope(
|
| const WebTraceLocation&,
|
| std::unique_ptr<WTF::CrossThreadClosure>) = 0;
|
| @@ -82,14 +83,17 @@ class CORE_EXPORT WorkerLoaderProxy final
|
|
|
| ~WorkerLoaderProxy();
|
|
|
| + // This must be called from a worker thread.
|
| void postTaskToLoader(const WebTraceLocation&,
|
| std::unique_ptr<ExecutionContextTask>);
|
| +
|
| + // This must be called from the main thread.
|
| void postTaskToWorkerGlobalScope(const WebTraceLocation&,
|
| std::unique_ptr<WTF::CrossThreadClosure>);
|
|
|
| // Notification from the provider that it can no longer be accessed. An
|
| // implementation of WorkerLoaderProxyProvider is required to call
|
| - // detachProvider() when finalizing.
|
| + // detachProvider() when finalizing. This must be called from the main thread.
|
| void detachProvider(WorkerLoaderProxyProvider*);
|
|
|
| private:
|
|
|