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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.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/DocumentThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
index a55966137827920f60aa75830077e1a3616c26c1..1c52ed8dba4f5f6d7838966d69110c1a94e009e8 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -38,11 +38,13 @@
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/loader/ThreadableLoader.h"
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
Nate Chapin 2016/03/09 17:51:09 Why this include?
hiroshige 2016/03/09 19:11:24 This is according to tyoshino@'s comment and I thi
#include "platform/network/HTTPHeaderMap.h"
#include "platform/network/ResourceError.h"
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
-#include "wtf/PassRefPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/WeakPtr.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -57,7 +59,7 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv
USING_FAST_MALLOC(DocumentThreadableLoader);
public:
static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
- static PassRefPtr<DocumentThreadableLoader> create(Document&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+ static PassOwnPtr<DocumentThreadableLoader> create(Document&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
~DocumentThreadableLoader() override;
void start(const ResourceRequest&) override;
@@ -230,6 +232,8 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv
int m_corsRedirectLimit;
WebURLRequest::FetchRedirectMode m_redirectMode;
+
+ WeakPtrFactory<DocumentThreadableLoader> m_weakFactory;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698