Index: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
index 91c1f35dc372283ba2e9e00c762ff37719f78c61..0c59c3d6b1c7c6e3c2600df2b04b58ca332676d5 100644 |
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp |
@@ -48,7 +48,6 @@ |
#include "core/workers/WorkerContentSettingsClient.h" |
#include "core/workers/WorkerGlobalScope.h" |
#include "core/workers/WorkerInspectorProxy.h" |
-#include "core/workers/WorkerLoaderProxy.h" |
#include "core/workers/WorkerScriptLoader.h" |
#include "core/workers/WorkerThreadStartupData.h" |
#include "modules/serviceworkers/ServiceWorkerContainerClient.h" |
@@ -130,8 +129,6 @@ WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() { |
web_view_->Close(); |
main_frame_->Close(); |
- if (loader_proxy_) |
- loader_proxy_->DetachProvider(this); |
} |
void WebEmbeddedWorkerImpl::StartWorkerContext( |
@@ -266,14 +263,6 @@ void WebEmbeddedWorkerImpl::PostMessageToPageInspector(const String& message) { |
worker_inspector_proxy_->DispatchMessageFromWorker(message); |
} |
-ThreadableLoadingContext* WebEmbeddedWorkerImpl::GetThreadableLoadingContext() { |
- if (!loading_context_) { |
- loading_context_ = ThreadableLoadingContext::Create( |
- *main_frame_->GetFrame()->GetDocument()); |
- } |
- return loading_context_; |
-} |
- |
void WebEmbeddedWorkerImpl::PrepareShadowPageForLoader() { |
// Create 'shadow page', which is never displayed and is used mainly to |
// provide a context for loading on the main thread. |
@@ -471,9 +460,8 @@ void WebEmbeddedWorkerImpl::StartWorkerThread() { |
worker_global_scope_proxy_ = |
ServiceWorkerGlobalScopeProxy::Create(*this, *worker_context_client_); |
- loader_proxy_ = WorkerLoaderProxy::Create(this); |
- worker_thread_ = |
- ServiceWorkerThread::Create(loader_proxy_, *worker_global_scope_proxy_); |
+ worker_thread_ = WTF::MakeUnique<ServiceWorkerThread>( |
+ ThreadableLoadingContext::Create(*document), *worker_global_scope_proxy_); |
// We have a dummy document here for loading but it doesn't really represent |
// the document/frame of associated document(s) for this worker. Here we |