Chromium Code Reviews| 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_) |