Description(Reland) Service Worker: Handle same-scope, new script registration
Reland of 2da192aff after:
- disabling some layout tests that need to be rebaselined
- landing 6cce6b78f "Decouple script_url from ServiceWorkerRegistration"
so Registration doesn't get in a weird state with a script_url that failed to
register
Before this patch, register() would delete an existing registration at
the scope if the script URL didn't match, and register a new one. This
overwriting creates a scenario where old tabs have a different
controller than new tabs, which the Service Worker spec avoids.
This patch implements the spec steps for same-scope, new script
register(). That means:
- If the existing registration is uninstalling, wait for that to
complete before doing anything.
- Create a new worker which becomes the installing worker of the
existing registration.
BUG=398355
TEST=https://codereview.chromium.org/480943002/
Committed: https://crrev.com/0b0c1c512f7a797a3f5ba679507109af87d12e1b
Cr-Commit-Position: refs/heads/master@{#292106}
Patch Set 1 #Patch Set 2 : fix whitespace #Patch Set 3 : improve todo #Patch Set 4 : sync #
Messages
Total messages: 9 (0 generated)
|