Commit ca3197f7 authored by Yuzu Saijo's avatar Yuzu Saijo Committed by Commit Bot

[bfcache] Change DCHECK to CHECK to fix crashes

This CL changes DCHECKs to CHECKs in ServiceWorkerVersion::Restore
ControlleeFromBackForwardCacheMap to figure out the cause of the
crashes.

Bug: 1021718
Change-Id: Ifdfe7772466b24ce18366d66895152b132b929c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2035529
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Auto-Submit: Yuzu Saijo <yuzus@chromium.org>
Reviewed-by: default avatarMakoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738532}
parent a774eaf7
......@@ -798,10 +798,12 @@ void ServiceWorkerVersion::MoveControlleeToBackForwardCacheMap(
void ServiceWorkerVersion::RestoreControlleeFromBackForwardCacheMap(
const std::string& client_uuid) {
DCHECK(IsBackForwardCacheEnabled());
DCHECK(!base::Contains(controllee_map_, client_uuid));
DCHECK(base::Contains(bfcached_controllee_map_, client_uuid));
AddControllee(bfcached_controllee_map_[client_uuid]);
// TODO(crbug.com/1021718): Change these to DCHECK once we figure out the
// cause of crash.
CHECK(IsBackForwardCacheEnabled());
CHECK(!base::Contains(controllee_map_, client_uuid));
CHECK(base::Contains(bfcached_controllee_map_, client_uuid));
AddControllee(bfcached_controllee_map_.at(client_uuid));
bfcached_controllee_map_.erase(client_uuid);
}
......
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