Open Bug 1730706 Opened 3 years ago Updated 2 years ago

Remove IDBLocaleAwareKeyRange

Categories

(Core :: Storage: IndexedDB, task)

task

Tracking

()

People

(Reporter: hsivonen, Unassigned)

References

(Blocks 2 open bugs)

Details

According to MDN, this is a behind-flag Firefox-specific feature. It looks like we haven't made the effort to move this into a standard and not-behind-flag in 6 years.

Implementation-wise, this feature is unusual in Gecko in the sense that it uses collation key objects that even SQLite doesn't appear to use.

I've proposed that collation key objects not be part of ICU4X collator MVP.

Let's remove IDBLocaleAwareKeyRange if we aren't moving to standard and enabled-by-default.

Blocks: 1254928

FWIW, this seems reasonable to me. Once we do this I'll close https://github.com/w3c/IndexedDB/issues/38.

asuth, is this removal OK, and do you see entanglements in other features that would make this tricky to remove?

(Again, the context is getting rid of stored collation key objects in preparation for ICU4X.)

Flags: needinfo?(bugmail)

AFAICT, removing this would also remove our call to ICU's locale canonicalizer.

https://searchfox.org/mozilla-central/search?q=CanonicalizeICULevel1

(In reply to Henri Sivonen (:hsivonen) from comment #2)

asuth, is this removal OK, and do you see entanglements in other features that would make this tricky to remove?

It should be fine to remove. I think all the Firefox OS related APIs like mozContacts that used the mechanism no longer exist in-tree, and for KaiOS it looks like the mozContacts API is now implemented as a much simpler rust service.

The largest complication is that IndexedDB obviously involves a database schema. The schema v18 to v19 upgrade logic makes clear what the changes were to add locale support. The reverse operation is a little more involved than adding the column was because we can't drop a column from a table while other parts of the schema reference it. However, we can probably avoid the more involved schema change process by just dropping the indices first and then dropping the columns. It's reasonably straightforward to define the upgrade for this and this is not a situation where we would need to induce a QuotaManager sweep of all IDB databases to compel upgrades proactively; we can just do the upgrades on demand.

In general the test coverage seems quite localized to files that can just be removed, with the exception being https://searchfox.org/mozilla-central/source/dom/indexedDB/test/gtest/TestKey.cpp where the test case should be removed but the file retained.

Flags: needinfo?(bugmail)
You need to log in before you can comment on or make changes to this bug.