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

Unified Diff: components/precache/core/precache_fetcher.cc

Issue 2137593002: PrecacheFetcher::CancelPrecaching should run in the main UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: components/precache/core/precache_fetcher.cc
diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc
index dc0d3a272327a9ce1002ba33b377b2abb2f7e058..dd329985ed70370f5516a9b38b18f25e83515d95 100644
--- a/components/precache/core/precache_fetcher.cc
+++ b/components/precache/core/precache_fetcher.cc
@@ -359,6 +359,9 @@ PrecacheFetcher::~PrecacheFetcher() {
}
std::unique_ptr<PrecacheUnfinishedWork> PrecacheFetcher::CancelPrecaching() {
+ if (!unfinished_work_)
+ return nullptr;
Raj 2016/07/08 17:57:35 CancelPrecaching() could get called multiple times
sclittle 2016/07/11 18:16:51 Could you add this comment to the code too?
+
unfinished_work_->clear_manifest();
unfinished_work_->clear_resource();
for (const auto& manifest : manifest_urls_to_fetch_)

Powered by Google App Engine
This is Rietveld 408576698