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

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

Issue 2181243002: Move ThreadableLoader to Oilpan heap (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-bridge-peer-in-worker-threadable-loader
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/ThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoader.h b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
index 4d2643112b1eebfde5ad0a05f1daba6988034be2..9a1be36d7503c56dd7a24311a12182e1f51cd994 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
@@ -34,6 +34,7 @@
#include "core/CoreExport.h"
#include "core/fetch/ResourceLoaderOptions.h"
#include "platform/CrossThreadCopier.h"
+#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
#include <memory>
@@ -126,7 +127,7 @@ struct CrossThreadCopier<ThreadableLoaderOptions> {
// - ResourceLoaderOptions argument will be passed to the FetchRequest
// that this ThreadableLoader creates. It can be altered e.g. when
// redirect happens.
-class CORE_EXPORT ThreadableLoader {
+class CORE_EXPORT ThreadableLoader : public GarbageCollectedFinalized<ThreadableLoader> {
WTF_MAKE_NONCOPYABLE(ThreadableLoader);
public:
// ThreadableLoaderClient methods may not destroy the ThreadableLoader
@@ -167,7 +168,7 @@ public:
// - may call cancel()
// - can destroy the ThreadableLoader instance in them (by clearing
// std::unique_ptr<ThreadableLoader>).
- static std::unique_ptr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+ static ThreadableLoader* create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
// The methods on the ThreadableLoaderClient passed on create() call
// may be called synchronous to start() call.
@@ -184,6 +185,8 @@ public:
virtual ~ThreadableLoader() { }
+ DEFINE_INLINE_VIRTUAL_TRACE() {}
+
protected:
ThreadableLoader() { }
};

Powered by Google App Engine
This is Rietveld 408576698