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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.h

Issue 2840473002: Worker: Remove WorkerLoaderProxy for clean-up (Closed)
Patch Set: clean up Created 3 years, 7 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
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 1519bb6947ba9e8d470a5f29969ad33e7d2aa3a6..8de8cb3561328b4978c1a197d9dca033d88d4801 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 {
- CHECK(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,10 @@ class CORE_EXPORT WorkerThread : public WebThread::TaskObserver {
std::unique_ptr<InspectorTaskRunner> inspector_task_runner_;
- RefPtr<WorkerLoaderProxy> worker_loader_proxy_;
+ // Created on the main thread, passed to the worker thread but should kept
+ // being accessed only on the main thread.
+ CrossThreadPersistent<ThreadableLoadingContext> loading_context_;
+
WorkerReportingProxy& worker_reporting_proxy_;
CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_;
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp ('k') | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698