Xray attribute doesn't have get/set prefix
Categories
(Core :: DOM: Bindings (WebIDL), defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(2 files)
Xray function created for WebIDL attribute uses the attribute's name as the function name,
and it lacks "get " or "set " prefix.
static bool XrayResolveAttribute(
JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<JSObject*> obj,
JS::Handle<jsid> id, const Prefable<const JSPropertySpec>& pref,
const JSPropertySpec& attrSpec,
JS::MutableHandle<Maybe<JS::PropertyDescriptor>> desc,
bool& cacheOnHolder) {
...
JS::Rooted<JSObject*> getter(
cx, XrayCreateFunction(cx, wrapper, attrSpec.u.accessors.getter.native, 0,
id));
...
setter = XrayCreateFunction(cx, wrapper, attrSpec.u.accessors.setter.native,
1, id);
I'm going to use the xray function in bug 1806598 to check if given accessor is safe for eager evaluation,
but the machinery uses the function name as a map key, and the missing "get " prefix is slightly problematic (can workaround, but it would be better if the prefix is added by default)
Updated•2 years ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D168342
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Also remove the workaround to add get/set prefix in debugger.
Depends on D168512
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/810ed5832764 Part 1: Add JS::ToGetterId and JS::ToSetterId. r=sfink https://hg.mozilla.org/integration/autoland/rev/3b0e28b20def Part 2: Add get/set prefix for Xray accessors. r=nchevobbe,peterv
Comment 4•1 year ago
|
||
Backed out for causing dt failures in devtools/client/webconsole/test/browser/browser_console_evaluation_context_selector.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/c4af9a62fcca732c7d39ea8bc8cdd36c37c4b046
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/e9e469586319 Part 1: Add JS::ToGetterId and JS::ToSetterId. r=sfink https://hg.mozilla.org/integration/autoland/rev/5c2b32e98bed Part 2: Add get/set prefix for Xray accessors. r=nchevobbe,peterv
Comment 6•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e9e469586319
https://hg.mozilla.org/mozilla-central/rev/5c2b32e98bed
Assignee | ||
Updated•1 year ago
|
Description
•