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

Unified Diff: Source/core/loader/WorkerThreadableLoader.cpp

Issue 204983007: Make ThreadableLoader class to use references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments Created 6 years, 9 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 | « Source/core/loader/WorkerThreadableLoader.h ('k') | Source/core/page/EventSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/WorkerThreadableLoader.cpp
diff --git a/Source/core/loader/WorkerThreadableLoader.cpp b/Source/core/loader/WorkerThreadableLoader.cpp
index d716f2ac4a9ab7ad5cb18f19a29f6a268c1a8b6e..64e21d055f371f728a7203726a5ed40514fe8cc8 100644
--- a/Source/core/loader/WorkerThreadableLoader.cpp
+++ b/Source/core/loader/WorkerThreadableLoader.cpp
@@ -51,10 +51,10 @@
namespace WebCore {
-WorkerThreadableLoader::WorkerThreadableLoader(WorkerGlobalScope* workerGlobalScope, PassRefPtr<ThreadableLoaderClientWrapper> clientWrapper, PassOwnPtr<ThreadableLoaderClient> clientBridge, const ResourceRequest& request, const ThreadableLoaderOptions& options)
- : m_workerGlobalScope(workerGlobalScope)
+WorkerThreadableLoader::WorkerThreadableLoader(WorkerGlobalScope& workerGlobalScope, PassRefPtr<ThreadableLoaderClientWrapper> clientWrapper, PassOwnPtr<ThreadableLoaderClient> clientBridge, const ResourceRequest& request, const ThreadableLoaderOptions& options)
+ : m_workerGlobalScope(&workerGlobalScope)
, m_workerClientWrapper(clientWrapper)
- , m_bridge(*(new MainThreadBridge(m_workerClientWrapper, clientBridge, m_workerGlobalScope->thread()->workerLoaderProxy(), request, options, workerGlobalScope->url().strippedForUseAsReferrer())))
+ , m_bridge(*(new MainThreadBridge(m_workerClientWrapper, clientBridge, workerGlobalScope.thread()->workerLoaderProxy(), request, options, workerGlobalScope.url().strippedForUseAsReferrer())))
{
}
@@ -63,10 +63,10 @@ WorkerThreadableLoader::~WorkerThreadableLoader()
m_bridge.destroy();
}
-void WorkerThreadableLoader::loadResourceSynchronously(WorkerGlobalScope* workerGlobalScope, const ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoaderOptions& options)
+void WorkerThreadableLoader::loadResourceSynchronously(WorkerGlobalScope& workerGlobalScope, const ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoaderOptions& options)
{
blink::WebWaitableEvent* shutdownEvent =
- workerGlobalScope->thread()->shutdownEvent();
+ workerGlobalScope.thread()->shutdownEvent();
OwnPtr<blink::WebWaitableEvent> loaderDone =
adoptPtr(blink::Platform::current()->createWaitableEvent());
@@ -128,7 +128,7 @@ void WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader(ExecutionC
OwnPtr<ResourceRequest> request(ResourceRequest::adopt(requestData));
request->setHTTPReferrer(Referrer(outgoingReferrer, ReferrerPolicyDefault));
options.requestInitiatorContext = WorkerContext;
- thisPtr->m_mainThreadLoader = DocumentThreadableLoader::create(document, thisPtr, *request, options);
+ thisPtr->m_mainThreadLoader = DocumentThreadableLoader::create(*document, thisPtr, *request, options);
if (!thisPtr->m_mainThreadLoader) {
// DocumentThreadableLoader::create may return 0 when the document loader has been already changed.
thisPtr->didFail(ResourceError(errorDomainBlinkInternal, 0, request->url().string(), "Can't create DocumentThreadableLoader"));
« no previous file with comments | « Source/core/loader/WorkerThreadableLoader.h ('k') | Source/core/page/EventSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698