Closed Bug 1710516 Opened 8 months ago Closed 8 months ago

DevTools support for ergonomic Brand Checks

Categories

(DevTools :: Console, task)

task

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mgaudet, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

We've got a complete implementation of ergonomic brand checks:

DevTools may need to do some work to support pretty printing programs that include #x in y expressions

Component: JavaScript Engine → Console
Product: Core → DevTools

Thanks for the heads up Matthew.

I did a quick test, flipping javascript.options.experimental.ergonomic_brand_checks on
With patch for Bug 1710417, pretty printing seems to be fine.
But this new syntax does break some features in debugger (outline view, inline preview, variable tooltip).
We do get an error in the terminal:

new SyntaxError("This experimental syntax requires enabling the parser plugin: 'privateIn' (9:19)", "resource://devtools/client/debugger/dist/parser-worker.js", 17131))

In order to fix this, we should add this babel plugin: https://babeljs.io/docs/en/babel-plugin-proposal-private-property-in-object


We can probably do this right now, without waiting for Bug 1710510 as the impacts seem pretty low, and we could have a test with the pref turned on

Depends on: 1710510
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Since ergonomic brand check were enabled in Bug 1710510,
babel needs support to parse script using this new syntax.
A test case is added, and the test was failing without the
new plugin.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/96956318b4ea
[devtools] Add privateIn babel plugin to parser worker. r=bomsy.
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.