fix(service-worker): ensure SW stays alive while notifying clients about unrecoverable state (#40234)
fix(service-worker): ensure SW stays alive while notifying clients about unrecoverable state (#40234)

Previously, the `Driver#notifyClientsAboutUnrecoverableState()` method
would not wait for the completion of the promises created to notify the
clients. Theoretically, this could result in the SW instance's getting
destroyed by the browser before all clients have been notified. This is
extremely unlikely to happen in practice, since the async operations are
very quick, but it _is_ theoretically possible.

This commit ensures that the SW instance will remain alive while
notifying the clients by making `notifyClientsAboutUnrecoverableState()`
await the notification promises.

PR Close #40234

brandonroberts/angular,angular/angular,gkalpak/angular,mgechev/angular,brandonroberts/angular,mgechev/angular,shairez/angular,angular-indonesia/angular,blesh/angular,blesh/angular,gnomeontherun/angular,ocombe/angular,manekinekko/angular,mgechev/angular,manekinekko/angular,alxhub/angular,mgechev/angular,alxhub/angular,blesh/angular,angular-indonesia/angular,ocombe/angular,angular-indonesia/angular,angular-indonesia/angular,ocombe/angular,blesh/angular,IdeaBlade/angular,gnomeontherun/angular,angular/angular,JiaLiPassion/angular,gnomeontherun/angular,shairez/angular,manekinekko/angular,manekinekko/angular,alxhub/angular,mgechev/angular,alxhub/angular,gkalpak/angular,manekinekko/angular,JiaLiPassion/angular,shairez/angular,shairez/angular,manekinekko/angular,brandonroberts/angular,gnomeontherun/angular,IdeaBlade/angular,brandonroberts/angular,JiaLiPassion/angular,shairez/angular,brandonroberts/angular,ocombe/angular,JiaLiPassion/angular,blesh/angular,IdeaBlade/angular,IdeaBlade/angular,angular/angular,IdeaBlade/angular,gkalpak/angular,brandonroberts/angular,alxhub/angular,angular/angular,ocombe/angular,gkalpak/angular,ocombe/angular