Open
Bug 1848580
Opened 1 year ago
Updated 9 months ago
Add JSPropertySpec macro variant for value with WellKnownAtomId and replace JS_STRING_PS and JS_STRING_SYM_PS consumers
Categories
(Core :: JavaScript Engine, task, P3)
Core
JavaScript Engine
Tracking
()
ASSIGNED
People
(Reporter: arai, Assigned: arai)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
JSPropertySpec
with string value holds const char*
pointer and converts to JSAtom
when defining the property.
https://searchfox.org/mozilla-central/search?q=JS_STRING_PS&path=
https://searchfox.org/mozilla-central/search?q=JS_STRING_SYM_PS&path=&case=false®exp=false
JS_PUBLIC_API bool JSPropertySpec::getValue(JSContext* cx,
...
case ValueWrapper::Type::String: {
Rooted<JSAtom*> atom(cx,
Atomize(cx, u.value.string, strlen(u.value.string)));
In most case, the property is Symbol.toStringTag
and the value is a member of proto key, which exists in well-known atom, and we don't have to perform extra atomization here.
bug 1847677 and related bugs will refactor the JSPropertySpec
, in order to introduce well-known atom and embedding extension to the property key (not value),
so this can be done after that.
Updated•1 year ago
|
Whiteboard: [sp3]
Updated•1 year ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SP3-522
Assignee | ||
Updated•1 year ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D192415
Updated•9 months ago
|
Flags: needinfo?(macros-templates)
Updated•9 months ago
|
Flags: needinfo?(macros-templates)
Assignee | ||
Updated•9 months ago
|
a11y-review: requested → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•