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

Unified Diff: third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h

Issue 1274063003: [Loader] Make ThreadableLoader non-RefCounted and be managed by OwnPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments. Created 4 years, 10 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/loader/WorkerThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
index 70285fa9d9df69f4b16118e49a84c6bcc5c20e4a..bbbdb579f1dc70a5516bce8c1a14e937b147a6f7 100644
--- a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
@@ -61,9 +61,9 @@ class WorkerThreadableLoader final : public ThreadableLoader, private Threadable
USING_FAST_MALLOC(WorkerThreadableLoader);
public:
static void loadResourceSynchronously(WorkerGlobalScope&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
- static PassRefPtr<WorkerThreadableLoader> create(WorkerGlobalScope& workerGlobalScope, ThreadableLoaderClient* client, const ThreadableLoaderOptions& options, const ResourceLoaderOptions& resourceLoaderOptions)
+ static PassOwnPtr<WorkerThreadableLoader> create(WorkerGlobalScope& workerGlobalScope, ThreadableLoaderClient* client, const ThreadableLoaderOptions& options, const ResourceLoaderOptions& resourceLoaderOptions)
{
- return adoptRef(new WorkerThreadableLoader(workerGlobalScope, client, options, resourceLoaderOptions, LoadAsynchronously));
+ return adoptPtr(new WorkerThreadableLoader(workerGlobalScope, client, options, resourceLoaderOptions, LoadAsynchronously));
}
~WorkerThreadableLoader() override;
@@ -148,7 +148,7 @@ private:
void mainThreadCancel(ExecutionContext*);
// Only to be used on the main thread.
- RefPtr<ThreadableLoader> m_mainThreadLoader;
+ OwnPtr<ThreadableLoader> m_mainThreadLoader;
// ThreadableLoaderClientWrapper is to be used on the worker context thread.
// The ref counting is done on either thread:

Powered by Google App Engine
This is Rietveld 408576698