Open
Bug 1850076
Opened 1 year ago
Updated 1 year ago
Use well-known atom in DOM binding code
Categories
(Core :: DOM: Bindings (WebIDL), task, P3)
Core
DOM: Bindings (WebIDL)
Tracking
()
NEW
People
(Reporter: arai, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Currently bindings code uses JSAPI which receives raw string pointer as property/function name.
bug 1848322 is going to make the WellKnownAtomId
public, and using it can skip the atomization step.
if (!JS_DefineProperty(cx, constructor, "length", ctorNargs,
...
if (!JS_DefineProperty(cx, constructor, "name", name, JSPROP_READONLY)) {
...
if (isChrome && !JS_DefineFunction(cx, constructor, "isInstance",
Reporter | ||
Comment 1•1 year ago
|
||
Also, the interface name is atomized in CreateInterfaceObjects
,
void CreateInterfaceObjects(
...
JS::Rooted<JSString*> nameStr(cx, JS_AtomizeString(cx, name));
Updated•1 year ago
|
Whiteboard: [sp3]
Updated•1 year ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-533
You need to log in
before you can comment on or make changes to this bug.
Description
•