Sanitizer: Use unordered sets and a map instead of lists
Categories
(Core :: DOM: Security, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files)
The Sanitizer API works on lists, but those lists behave more like sets, because they shouldn't really have duplicates. And during the core sanitization work, it's important to be able to quickly check if a specific element is part of the list. Both of these indicate properties really call for a a hash set, but sadly we have to maintain the insertion order, which is observable via the get() method...
Additionally for the elements case (SanitizerElementNamespaceWithAttributes), we have something that is more similar to a map in practice. It maps (namespace, localname) to (attributes, removeAttributes).
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
We are going to sort the result of get(), so we can go back to using unordered sets.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•11 months ago
|
Comment 7•11 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0c3f9ae91bc8
https://hg.mozilla.org/mozilla-central/rev/3fc51eb0e8bb
https://hg.mozilla.org/mozilla-central/rev/5f23528ad0d4
Updated•10 months ago
|
Description
•