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

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

Issue 2840473002: Worker: Remove WorkerLoaderProxy for clean-up (Closed)
Patch Set: wip 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/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index df1c855549616284cc81191861fa9a16353e306a..55dac054279dd5c585c47e3052b60cfd21b2f1c4 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -46,7 +46,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"
@@ -99,8 +98,6 @@ WebSharedWorkerImpl::~WebSharedWorkerImpl() {
web_view_->Close();
main_frame_->Close();
- if (loader_proxy_)
- loader_proxy_->DetachProvider(this);
}
void WebSharedWorkerImpl::TerminateWorkerThread() {
@@ -241,14 +238,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());
@@ -353,10 +342,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_ = SharedWorkerThread::Create(
+ 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();

Powered by Google App Engine
This is Rietveld 408576698