Open
Bug 1509199
Opened 6 years ago
Updated 2 years ago
Support IndexDB convert-key-to-value in JSAPI
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: tcampbell, Unassigned)
References
(Blocks 1 open bug)
Details
The IndexedDB value-to-key algorithm describes a conversion from a JS Value to an IndexedDB key representation.
https://www.w3.org/TR/IndexedDB/#convert-a-value-to-a-key
We should consider adding support in JSAPI for this similar to how SpiderMonkey maintains the StructuredClone code. This makes fuzzing easier and optimizations can be made robust as JSAPI continues to evolve.
For example, the IsArray branch of the algorithm can directly walk the dense elements array. An up-front check of the INDEXED flag would immediately tell us if there are any getters to worry about, and hole checks would be very fast.
One complication is how to design the API so that the result can build up an Gecko IndexedDB key representation which is itself a little clever.
There are no active plans yet for this project, but I've opened a bug so we can track discussion related to it.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•