Commit 64bc8686 authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Convert DCHECK to CHECK to validate cause of HttpCacheTransaction bug

DoneHeadersAddToEntryComplete assumes that the previous result is OK.
However, it may be ERR_CACHE_RACE in some situations, resulting in a
crash. Converting to a CHECK would verify that this is the cause of
some crashes observed in the wild.

Bug: 959194
Change-Id: Ib989e85b5334667875e8669f442f32c274b0d23c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773163Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690762}
parent 538b71e0
...@@ -1427,7 +1427,7 @@ int HttpCache::Transaction::DoDoneHeadersAddToEntryComplete(int result) { ...@@ -1427,7 +1427,7 @@ int HttpCache::Transaction::DoDoneHeadersAddToEntryComplete(int result) {
// created a new ActiveEntry (new_entry_) to write to (and doomed the old // created a new ActiveEntry (new_entry_) to write to (and doomed the old
// one). Now that the new entry has been created, start writing the response. // one). Now that the new entry has been created, start writing the response.
DCHECK_EQ(result, OK); CHECK_EQ(result, OK);
DCHECK_EQ(mode_, WRITE); DCHECK_EQ(mode_, WRITE);
DCHECK(new_entry_); DCHECK(new_entry_);
DCHECK(response_.headers); DCHECK(response_.headers);
......
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