Closed
Bug 1847862
Opened 1 year ago
Closed 9 months ago
pre-calculate hash for WebIDLNameTableEntry
Categories
(Core :: DOM: Bindings (WebIDL), task, P3)
Core
DOM: Bindings (WebIDL)
Tracking
()
RESOLVED
DUPLICATE
of bug 1850344
People
(Reporter: arai, Assigned: arai)
References
(Blocks 1 open bug)
Details
WebIDLNameTableEntry
entry is used for creating atoms.
the string hash is calculated inside the API, but the hash is known at compile time and bindgen can generate mozilla::HashStringKnownLength
call for it.
bool WebIDLGlobalNameHash::GetNames(JSContext* aCx, JS::Handle<JSObject*> aObj,
NameType aNameType,
JS::MutableHandleVector<jsid> aNames) {
...
JSString* str = JS_AtomizeStringN(aCx, BindingName(entry.mNameOffset),
entry.mNameLength);
struct WebIDLNameTableEntry {
...
BindingNamesOffset mNameOffset;
uint16_t mNameLength;
const WebIDLNameTableEntry WebIDLGlobalNameHash::sEntries[] = {
{
/* mNameOffset */ BindingNamesOffset::Plugin,
/* mNameLength */ 6,
Assignee | ||
Updated•1 year ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•1 year ago
|
||
this might become unnecessary if we can extend the well-known atoms with gecko atoms in bug 1848278.
See Also: → 1848278
Assignee | ||
Comment 2•9 months ago
|
||
This will be handled as a part of bug 1850344, by replacing the atomization code with extended-known atom.
You need to log in
before you can comment on or make changes to this bug.
Description
•