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

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

Issue 1262593004: Prevent ThreadableLoaderClient methods from being called after failure notification (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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: Source/core/loader/ThreadableLoader.h
diff --git a/Source/core/loader/ThreadableLoader.h b/Source/core/loader/ThreadableLoader.h
index e48f842e36da137ccf8d532a5c563034211af258..ad2f652b2fd1626425ad5250d55190cb39fd8872 100644
--- a/Source/core/loader/ThreadableLoader.h
+++ b/Source/core/loader/ThreadableLoader.h
@@ -115,16 +115,25 @@ template<> struct CrossThreadCopierBase<false, false, false, ThreadableLoaderOpt
// Useful for doing loader operations from any thread (not threadsafe,
// just able to run on threads other than the main thread).
+//
+// Arguments common to both loadResourceSynchronously() and create():
+//
+// - ThreadableLoaderOptions argument configures this ThreadableLoader's
+// behavior.
+//
+// - 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 : public RefCounted<ThreadableLoader> {
WTF_MAKE_NONCOPYABLE(ThreadableLoader);
public:
- // ThreadableLoaderOptions argument configures this ThreadableLoader's
- // behavior.
- //
- // ResourceLoaderOptions argument will be passed to the FetchRequest
- // that this ThreadableLoader creates. It can be altered e.g. when
- // redirect happens.
static void loadResourceSynchronously(ExecutionContext&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+ // The following ThreadableLoaderClient methods may destroy the
+ // ThreadableLoader instance in them.
+ // - didFinishLoading()
+ // - didFail()
+ // - didFailAccessControlCheck()
+ // - didFailRedirectCheck()
hiroshige 2015/08/10 15:15:13 How about the following? // Loading completes
tyoshino (SeeGerritForStatus) 2015/08/26 12:57:33 Done.
static PassRefPtr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
// A ThreadableLoader may have a timeout specified. It is possible, in some cases, for

Powered by Google App Engine
This is Rietveld 408576698