Skip to content

Commit

Permalink
Add CHECK for cobalt::loader::FetcherCache
Browse files Browse the repository at this point in the history
Add more CHECK to identify the root cause of the crash.

b/270993319
  • Loading branch information
borongc committed Nov 15, 2023
1 parent 96eaadf commit 9def070
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cobalt/loader/fetcher_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ void FetcherCache::OnFetchSuccess(

total_size_ += entry->capacity();
++count_resources_cached_;
// TODO(b/270993319): For debugging cache integrity issues in production
// only, remove after identifying the root cause.
CHECK_EQ(count_resources_cached_, static_cast<int>(cache_entries_.size()));

while (total_size_ > capacity_) {
// TODO(b/270993319): For debugging cache integrity issues in production
Expand Down

0 comments on commit 9def070

Please sign in to comment.