js-analyze.js doesn't handle ClassField AST nodes
Categories
(Webtools :: Searchfox, defect)
Tracking
(Not tracked)
People
(Reporter: asuth, Assigned: asuth)
References
()
Details
Attachments
(1 file)
|
4.54 KB,
text/plain
|
Details |
SpiderMonkey added support for JS class fields in bug 1499448 which is an implementation of https://github.com/tc39/proposal-class-fields. js-analyze.js just started exploding today on https://hg.mozilla.org/mozilla-central/file/tip/devtools/client/debugger/src/workers/parser/tests/fixtures/class.js#l10.
Fix coming. I modified some_javascript.js to have the following revised class at the top:
class Foo {
static bar(baz) {
return baz;
}
wacky_field = b => {
return b * 2;
};
}
I've attached the prettified JSON AST from the exception logged on wacky_field.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
It turns out the static bar() {...} in the example above seemed to the break the parser/my expectations about the parser in some way that caused ClassField nodes to silently not be emitted at all, which made things confusing as I tried to figure out how to deal with the implications of private fields for searchfox symbol generation purposes.
I'll continue to try and pursue making the anlyzer understand fields and perhaps file spin-off JS engine bugs as appropriate, but in the meantime a quick mitigation fix is to add --disable-experimental-fields to our js invocation so we just don't get ClassField nodes.
Updated•6 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
A new release/master run successfully completed with the landed fix at 1:03am eastern.
Description
•