Open Bug 1577227 Opened 5 years ago Updated 3 years ago

Can we remove the mozGetAll and mozGetAllKeys functions on IDBIndex and IDBObjectStore?

Categories

(Core :: Storage: IndexedDB, task, P3)

task

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: site-compat)

I assume other browsers don't have them. Why do we have these bits?

Also, what about IDBObjectStore.mozGetAll?

Summary: Can we remove the mozGetAll and mozGetAllKeys functions on IDBIndex? → Can we remove the mozGetAll and mozGetAllKeys functions on IDBIndex and IDBObjectStore?

Jan and Andrew

Could you give comments remove these two attributes?
If you decide to remove them, I think I or Simon can help to write a patch for it.
Thanks.

Flags: needinfo?(jvarga)
Flags: needinfo?(bugmail)
Priority: -- → P3

getAll and getAllKeys are now part of the official IDB spec, so they should be moved from the partial interface to the main one.

mozGetAll is still used internally:
https://searchfox.org/mozilla-central/rev/7088fc958db5935eba24b413b1f16d6ab7bd13ea/dom/push/PushDB.jsm#316
That needs to be fixed.

We probably need to add use counters for mozGetAll and mozGetAllKeys before removing it, and maybe just deprecate them for now.

Also see this comment:
https://searchfox.org/mozilla-central/rev/7088fc958db5935eba24b413b1f16d6ab7bd13ea/dom/webidl/IDBObjectStore.webidl#63

Flags: needinfo?(jvarga)

getAll and getAllKeys were added in IndexedDB v2:
https://www.w3.org/TR/2016/WD-IndexedDB-2-20160818/

I'm in agreement with Jan. We should try and remove the moz-specific prefixed versions, but we should avoid breaking existing consumers, so use-counters are appropriate. As an extension of what Jan says, since these were standardized, the relative harm in exposing the getters is low, but it's still a worthwhile endeavor for us to remove them.

Flags: needinfo?(bugmail)
Type: defect → task
Keywords: site-compat
Blocks: 1254928
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.