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

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

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
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index 9b2a552d4db9bebe7c47fb93db6efe6e10da3c87..e23768fac3cea494a95e5368cb3a70985947d62b 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -49,7 +49,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 "platform/CrossThreadFunctional.h"
@@ -102,8 +101,6 @@ WebSharedWorkerImpl::~WebSharedWorkerImpl() {
web_view_->Close();
main_frame_->Close();
- if (loader_proxy_)
- loader_proxy_->DetachProvider(this);
}
void WebSharedWorkerImpl::TerminateWorkerThread() {
@@ -252,14 +249,6 @@ void WebSharedWorkerImpl::DidTerminateWorkerThread() {
delete this;
}
-ThreadableLoadingContext* WebSharedWorkerImpl::GetThreadableLoadingContext() {
- if (!loading_context_) {
- loading_context_ =
- ThreadableLoadingContext::Create(*ToDocument(loading_document_.Get()));
- }
- return loading_context_;
-}
-
void WebSharedWorkerImpl::Connect(
std::unique_ptr<WebMessagePortChannel> web_channel) {
DCHECK(IsMainThread());
@@ -384,10 +373,11 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() {
ParentFrameTaskRunners* task_runners =
ParentFrameTaskRunners::Create(nullptr);
- loader_proxy_ = WorkerLoaderProxy::Create(this);
reporting_proxy_ = new WebSharedWorkerReportingProxyImpl(this, task_runners);
- worker_thread_ =
- SharedWorkerThread::Create(name_, loader_proxy_, *reporting_proxy_);
+ worker_thread_ = WTF::MakeUnique<SharedWorkerThread>(
+ name_,
+ ThreadableLoadingContext::Create(*ToDocument(loading_document_.Get())),
+ *reporting_proxy_);
probe::scriptImported(loading_document_, main_script_loader_->Identifier(),
main_script_loader_->SourceText());
main_script_loader_.Clear();
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698