Skip to content

Commit

Permalink
Speculative fix of CHECK failure.
Browse files Browse the repository at this point in the history
As far as I understand, the reason of the CHECK failure is that a
dedicated worker would not be in back_forward_cache_controllee_map_ if
it is written with a blob URL and inherits the creator's ServiceWorker.

This provides the speculative fix for that.

Bug: 348173286, 330928087
Change-Id: Ic797887498ea1d45d72a9e7392033ea1163115ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5641949
Reviewed-by: Shunya Shishido <[email protected]>
Reviewed-by: Minoru Chikamune <[email protected]>
Reviewed-by: Yuzu Saijo <[email protected]>
Commit-Queue: Yoshisato Yanagisawa <[email protected]>
Reviewed-by: Hiroki Nakagawa <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1317836}
  • Loading branch information
yoshisatoyanagisawa authored and Chromium LUCI CQ committed Jun 21, 2024
1 parent ec6f979 commit 3d36d05
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,10 @@ void ServiceWorkerClient::InheritControllerFrom(
// Inherit the controller of the creator.
if (creator_host.controller_registration()) {
AddMatchingRegistration(creator_host.controller_registration());
// If the creator is in back forward cache, the client should also
// be in back forward cache. Otherwise, CHECK fail during restoring from
// back forward cache.
is_in_back_forward_cache_ = creator_host.is_in_back_forward_cache();
SetControllerRegistration(creator_host.controller_registration(),
false /* notify_controllerchange */);
}
Expand Down

0 comments on commit 3d36d05

Please sign in to comment.