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

Unified Diff: third_party/WebKit/Source/core/workers/DedicatedWorkerTest.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/core/workers/DedicatedWorkerTest.cpp
diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
index 1da848b7ada3299d60be9533e1d895b881dc7515..6dda52e5553a867c40c71f73afcc39f4317076f1 100644
--- a/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
+++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
@@ -37,13 +37,10 @@ const double kMaxIntervalInSec = 0.02;
class DedicatedWorkerThreadForTest final : public DedicatedWorkerThread {
public:
- DedicatedWorkerThreadForTest(
- WorkerLoaderProxyProvider* worker_loader_proxy_provider,
- InProcessWorkerObjectProxy& worker_object_proxy)
- : DedicatedWorkerThread(
- WorkerLoaderProxy::Create(worker_loader_proxy_provider),
- worker_object_proxy,
- MonotonicallyIncreasingTime()) {
+ DedicatedWorkerThreadForTest(InProcessWorkerObjectProxy& worker_object_proxy)
+ : DedicatedWorkerThread(nullptr /* ThreadableLoadingContext */,
+ worker_object_proxy,
+ MonotonicallyIncreasingTime()) {
worker_backing_thread_ = WorkerBackingThread::CreateForTest("Test thread");
}
@@ -92,10 +89,8 @@ class InProcessWorkerMessagingProxyForTest
WorkerObjectProxy().next_interval_in_sec_ = kNextIntervalInSec;
WorkerObjectProxy().max_interval_in_sec_ = kMaxIntervalInSec;
- worker_loader_proxy_provider_ =
- WTF::MakeUnique<WorkerLoaderProxyProvider>();
- worker_thread_ = WTF::WrapUnique(new DedicatedWorkerThreadForTest(
- worker_loader_proxy_provider_.get(), WorkerObjectProxy()));
+ worker_thread_ =
+ WTF::WrapUnique(new DedicatedWorkerThreadForTest(WorkerObjectProxy()));
mock_worker_thread_lifecycle_observer_ =
new MockWorkerThreadLifecycleObserver(
worker_thread_->GetWorkerThreadLifecycleContext());
@@ -106,8 +101,6 @@ class InProcessWorkerMessagingProxyForTest
~InProcessWorkerMessagingProxyForTest() override {
EXPECT_FALSE(blocking_);
- worker_thread_->GetWorkerLoaderProxy()->DetachProvider(
- worker_loader_proxy_provider_.get());
}
void StartWithSourceCode(const String& source) {
@@ -192,7 +185,6 @@ class InProcessWorkerMessagingProxyForTest
}
private:
- std::unique_ptr<WorkerLoaderProxyProvider> worker_loader_proxy_provider_;
Persistent<MockWorkerThreadLifecycleObserver>
mock_worker_thread_lifecycle_observer_;
RefPtr<SecurityOrigin> security_origin_;

Powered by Google App Engine
This is Rietveld 408576698