Remove mirrored C++ maplike/setlike data structures in Custom Highlight API
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
People
(Reporter: jjaschke, Assigned: jjaschke)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
Attachments
(3 files)
Custom Highlight API classes Highlight and HighlightRegistry are exposed to JS as setlike / maplike interfaces. However, the contents of the maplike/setlike are accessed from C++.
Currently the webIDL interface only provides the ability to inject code into Add()/Set(), Delete() and Clear(). This allowed to add a mirrored data structure (nsTArray<T> for setlike, nsTArray<CompactPair<K, V>> for maplike) which is accessible from C++ and allows to iterate the contents.
Even if these mirrored data structures are private members of the classes, it imposes the danger of the C++ data becoming out of sync with the original data. To avoid this in a proper way, begin() and end() iterators should be provided by the webIDL code so that C++ code can iterate on the original data without imposing the risk of the data becoming out of sync.
| Assignee | ||
Comment 1•10 days ago
|
||
Updated•10 days ago
|
| Assignee | ||
Comment 2•10 days ago
|
||
| Assignee | ||
Comment 3•10 days ago
|
||
Description
•