CacheStorage: Fix flaky crashes with DCHECK enabled.
The cache-add.https.html WPT tests became flaky after landing crrev.com/c/2429308. The flakes were due to crashes accessing a vector element beyond its length. I believe this is due to: DCHECK(!blob_list_[index]); Which is performed before we check to see if we are already stopped. Since we clear this vector when stopped this DCHECK will crash if a completion comes in right after aborting. This CL moves the DCHECKs below our stopped check. It also explicitly sets the stopped state when successfully complete as well. Bug: 1134021,1130781 Change-Id: I075f2daca252ac78a93d5e3991f44389adcf9689 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2443069Reviewed-by:Marijn Kruisselbrink <mek@chromium.org> Commit-Queue: Ben Kelly <wanderview@chromium.org> Cr-Commit-Position: refs/heads/master@{#812766}
Showing
Please register or sign in to comment