Automatically clear origin/bucket when IDB database corruption is encountered (or just the database for the system principal), accounting for any APIs that allow for explicit handling of corruption
Categories
(Core :: Storage: IndexedDB, enhancement)
Tracking
()
People
(Reporter: asuth, Unassigned)
References
Details
Currently we throw UnknownErr when corruption is encountered in an IndexedDB database but we should be clearing the storage bucket that contains it. Currently, there's only one bucket per origin, so this would be the entirety of the origin's storage, although practically speaking it probably makes sense to leave cookies intact and potentially even LocalStorage (although this diverges from the spec and so it's likely appropriate to discuss revising the spec, otherwise this would be categorized as an intervention). In the case of corruption for IDB databases stored against the system principal (ex: remote settings in bug 1759247), just the individual database should be cleared.
The only time we wouldn't clear the entirety of the origin would be if something like https://github.com/wanderview/storage-corruption-reporting/blob/master/explainer.md becomes standardized, in which case we'd allow content a chance to handle things.
Description
•