Commit 4d31ae47 authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

CacheStorage: Check for nullptr cache_manager() when storing code cache metadata.

The CacheStorageContext::cache_manager() value can be nullptr if the
BrowserContext and its StoragePartition is in the process of shutting down.

Bug: 914052
Change-Id: I10735b1c6e4ad2bc7700c6508dd8d24e81f8b666
Reviewed-on: https://chromium-review.googlesource.com/c/1372554Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615877}
parent a5a8f2d4
......@@ -202,6 +202,9 @@ void CodeCacheHostImpl::DidGenerateCacheableMetadataInCacheStorage(
const std::vector<uint8_t>& data,
const url::Origin& cache_storage_origin,
const std::string& cache_storage_cache_name) {
if (!cache_storage_context_->cache_manager())
return;
scoped_refptr<net::IOBuffer> buf =
base::MakeRefCounted<net::IOBuffer>(data.size());
if (!data.empty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment