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.