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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp

Issue 2811993007: Worker: Remove cross-thread PostTask functions from WorkerLoaderProxy (Closed)
Patch Set: address review comments Created 3 years, 8 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/WorkerLoaderProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp
index 1f7f960f2a2d0d0dcf7c0521e3a2cdebf7e64720..59b65a05d4c5242d32a803ec79d0b05e70018dbe 100644
--- a/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.cpp
@@ -18,36 +18,13 @@ WorkerLoaderProxy::~WorkerLoaderProxy() {
void WorkerLoaderProxy::DetachProvider(
WorkerLoaderProxyProvider* proxy_provider) {
- MutexLocker locker(lock_);
DCHECK(IsMainThread());
DCHECK_EQ(proxy_provider, loader_proxy_provider_);
loader_proxy_provider_ = nullptr;
}
-void WorkerLoaderProxy::PostTaskToLoader(
- const WebTraceLocation& location,
- std::unique_ptr<WTF::CrossThreadClosure> task) {
- MutexLocker locker(lock_);
- DCHECK(!IsMainThread());
- if (!loader_proxy_provider_)
- return;
- loader_proxy_provider_->PostTaskToLoader(location, std::move(task));
-}
-
-void WorkerLoaderProxy::PostTaskToWorkerGlobalScope(
- const WebTraceLocation& location,
- std::unique_ptr<WTF::CrossThreadClosure> task) {
- DCHECK(IsMainThread());
- // Note: No locking needed for the access from the main thread.
- if (!loader_proxy_provider_)
- return;
- loader_proxy_provider_->PostTaskToWorkerGlobalScope(location,
- std::move(task));
-}
-
ThreadableLoadingContext* WorkerLoaderProxy::GetThreadableLoadingContext() {
DCHECK(IsMainThread());
- // Note: No locking needed for the access from the main thread.
if (!loader_proxy_provider_)
return nullptr;
DCHECK(

Powered by Google App Engine
This is Rietveld 408576698