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

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

Issue 2146403004: ThreadableLoader::cancel should be called before loader destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-threadable-loader-client-wrapper
Patch Set: fix Created 4 years, 5 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 3d2b2d20aff83707451037ea35d51a712d6890a3..1d77bee34bc34bb4ac09114cb7e1711b77c75d76 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
@@ -152,9 +152,9 @@ public:
// After any of these methods is called, the loader won't call any of the
// ThreadableLoaderClient methods.
//
- // When a ThreadableLoader is destructed, any of the
- // ThreadableLoaderClient methods is NOT called in response to the
- // destruction either synchronously or after destruction.
+ // A user must guarantee that the loading complete before the attached
+ // client gets invalid. Also, a user must guarantee that the loading
hiroshige 2016/07/19 06:56:14 nits: s/loading complete /loading completes / s/th
yhirano 2016/07/19 08:05:03 Done.
+ // completes before the threadable loader is destructed.
//
// When ThreadableLoader::cancel() is called,
// ThreadableLoaderClient::didFail() is called with a ResourceError
@@ -167,6 +167,9 @@ public:
// - may call cancel()
// - can destroy the ThreadableLoader instance in them (by clearing
// std::unique_ptr<ThreadableLoader>).
+ //
+ // A ThreadableLoader can be destructed only when the loading has already
+ // completed.
hiroshige 2016/07/19 06:56:14 Is this equivalent to the comment in Lines 156--15
yhirano 2016/07/19 08:05:04 Thanks, fixed.
static std::unique_ptr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
// The methods on the ThreadableLoaderClient passed on create() call

Powered by Google App Engine
This is Rietveld 408576698