New issue
Advanced search Search tips

Issue 912796 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Remove the hack to activate after 1 second of tab close

Project Member Reported by falken@chromium.org, Dec 7

Issue description

I added this for  issue 600226  but it's weird: it's noticeable to developers (https://github.com/w3c/ServiceWorker/issues/1372) and even users: if you close a tab and quickly reopen (Ctrl+W, Ctrl+Shift+W), page load gets delayed by 1 sec.

Ideally chrome tells content when it's in shutdown and we don't activate in that case.

I think at the time I did the original hack, shutdown could start and then be canceled by an unload event handler, e.g., it'd close tab 1,2,3,4,5 then if tab 6 has an unload event handler, the user could cancel it and then shutdown would stop, so tabs 6,7,8,9,10 would remain. In that case, we'd likely want to activate for tabs 1-5 if needed.

That behavior might have changed since I last looked, and unload event handlers are first consulted before closing tabs, so there's no concept of canceling shutdown once tabs start closing.
 

Sign in to add a comment