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

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: Rebase. 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 0725043a10cbe30295df6d48aeb9379caf8482a9..b49006eebac93e5a65bd513707b37715d9f47177 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -43,6 +43,7 @@
#include "wtf/Forward.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
tyoshino (SeeGerritForStatus) 2016/03/03 11:53:38 Change to PassOwnPtr.h and add Handle.h
hiroshige 2016/03/08 23:39:25 Done.
+#include "wtf/WeakPtr.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -57,7 +58,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;
@@ -223,6 +224,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