| 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..a5cf65086d2f665ced1263529f2e433788d25c9e 100644
|
| --- a/components/precache/core/precache_fetcher.cc
|
| +++ b/components/precache/core/precache_fetcher.cc
|
| @@ -359,6 +359,10 @@ PrecacheFetcher::~PrecacheFetcher() {
|
| }
|
|
|
| std::unique_ptr<PrecacheUnfinishedWork> PrecacheFetcher::CancelPrecaching() {
|
| + // This could get called multiple times, and it should be handled gracefully.
|
| + if (!unfinished_work_)
|
| + return nullptr;
|
| +
|
| unfinished_work_->clear_manifest();
|
| unfinished_work_->clear_resource();
|
| for (const auto& manifest : manifest_urls_to_fetch_)
|
|
|