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

Side by Side Diff: third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp

Issue 2254303004: Worker: Stop WorkerLoaderProxy::postTaskToWorkerGlobalScope from returning bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/loader/ThreadableLoader.h" 5 #include "core/loader/ThreadableLoader.h"
6 6
7 #include "core/dom/CrossThreadTask.h" 7 #include "core/dom/CrossThreadTask.h"
8 #include "core/fetch/MemoryCache.h" 8 #include "core/fetch/MemoryCache.h"
9 #include "core/fetch/ResourceLoaderOptions.h" 9 #include "core/fetch/ResourceLoaderOptions.h"
10 #include "core/loader/DocumentThreadableLoader.h" 10 #include "core/loader/DocumentThreadableLoader.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } 315 }
316 316
317 // WorkerLoaderProxyProvider methods. 317 // WorkerLoaderProxyProvider methods.
318 void postTaskToLoader(const WebTraceLocation& location, std::unique_ptr<Exec utionContextTask> task) override 318 void postTaskToLoader(const WebTraceLocation& location, std::unique_ptr<Exec utionContextTask> task) override
319 { 319 {
320 ASSERT(m_workerThread); 320 ASSERT(m_workerThread);
321 ASSERT(m_workerThread->isCurrentThread()); 321 ASSERT(m_workerThread->isCurrentThread());
322 document().postTask(location, std::move(task)); 322 document().postTask(location, std::move(task));
323 } 323 }
324 324
325 bool postTaskToWorkerGlobalScope(const WebTraceLocation& location, std::uniq ue_ptr<ExecutionContextTask> task) override 325 void postTaskToWorkerGlobalScope(const WebTraceLocation& location, std::uniq ue_ptr<ExecutionContextTask> task) override
326 { 326 {
327 ASSERT(m_workerThread); 327 ASSERT(m_workerThread);
328 m_workerThread->postTask(location, std::move(task)); 328 m_workerThread->postTask(location, std::move(task));
329 return true;
330 } 329 }
331 330
332 RefPtr<SecurityOrigin> m_securityOrigin; 331 RefPtr<SecurityOrigin> m_securityOrigin;
333 std::unique_ptr<MockWorkerReportingProxy> m_mockWorkerReportingProxy; 332 std::unique_ptr<MockWorkerReportingProxy> m_mockWorkerReportingProxy;
334 std::unique_ptr<WorkerThreadForTest> m_workerThread; 333 std::unique_ptr<WorkerThreadForTest> m_workerThread;
335 334
336 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; 335 std::unique_ptr<DummyPageHolder> m_dummyPageHolder;
337 Checkpoint m_checkpoint; 336 Checkpoint m_checkpoint;
338 // |m_loader| must be touched only from the worker thread only. 337 // |m_loader| must be touched only from the worker thread only.
339 CrossThreadPersistent<ThreadableLoader> m_loader; 338 CrossThreadPersistent<ThreadableLoader> m_loader;
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 EXPECT_CALL(*client(), didFailRedirectCheck()).WillOnce(InvokeWithoutArgs(th is, &ThreadableLoaderTest::clearLoader)); 848 EXPECT_CALL(*client(), didFailRedirectCheck()).WillOnce(InvokeWithoutArgs(th is, &ThreadableLoaderTest::clearLoader));
850 849
851 startLoader(redirectLoopURL()); 850 startLoader(redirectLoopURL());
852 callCheckpoint(2); 851 callCheckpoint(2);
853 serveRequests(); 852 serveRequests();
854 } 853 }
855 854
856 } // namespace 855 } // namespace
857 856
858 } // namespace blink 857 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698