Description[BackgroundSync] Handle storage failure
This CL introduces proper failure handling in case the storage backend fails.
Changes:
1. If the ServiceWorker is unregistered - Remove the sync registrations from memory
2. If the ServiceWorkerStorage is wiped - Reinit the BackgroundSyncManager
3. If reading or writing from ServiceWorkerStorage fails (SERVICE_WORKER_ERROR_FAILURE) - Delete everything and disable the BackgroundSyncManager until browser restart.
Added unittests for above cases. I had to change the unittest to register serviceworkers via the ServiceWorkerContext instead of directly in Storage so that the ServiceWorkerContextObserver receives updates.
BUG=449443
Committed: https://crrev.com/9059304cb5c6f7f683ea30259eeacc5a429566c9
Cr-Commit-Position: refs/heads/master@{#323756}
Patch Set 1 #Patch Set 2 : More tests #Patch Set 3 : Rebase #Patch Set 4 : Rebase #
Total comments: 16
Patch Set 5 : Address comments from PS4 #
Total comments: 6
Patch Set 6 : Address comments from PS5 #
Messages
Total messages: 23 (6 generated)
|