Closed Bug 1837926 Opened 11 months ago Closed 11 months ago

Scripts containing Regexp with v flag breaks can't be parsed by parser worker

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox-esr102 unaffected, firefox114 unaffected, firefox115 unaffected, firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox114 --- unaffected
firefox115 --- unaffected
firefox116 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce

  1. Evaluate the following in the console
const re = /^\p{RGI_Emoji}$/v;
const str = '⚽'; // '\u26BD'
re.test(str); 
debugger

Expected results

Debugger pauses, and I can see inline previews for re and str

Actual results

Debugger pauses, but there's no inline previews, and tooltip does not work
I can see the following error in the browser console:

new SyntaxError("Invalid regular expression flag. (2:31)", "resource://devtools/client/debugger/dist/parser-worker.js", 46107)


We probably only need to update babel so v flag in RegExp can be parsed

Set release status flags based on info from the regressing bug 1826574

:dminor, since you are the author of the regressor, bug 1826574, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

No need for SM folks to have a look, that's a devtools specific issue

Flags: needinfo?(dminor)

This is needed to handle the new Regexp v flag.
I'm taking this as an opportunity to fix a couple issue in the bundle script.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

Add plugin-proposal-unicode-sets-regex babel plugin and use it.
Add a jest test for it.

Depends on D180675

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fed7871f2851
[devtools] Update babel/parser package. r=devtools-reviewers,ochameau.
https://hg.mozilla.org/integration/autoland/rev/24cab11905b4
[devtools] Support new RegExp v flag in parser worker. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

== Change summary for alert #38687 (as of Wed, 14 Jun 2023 17:52:42 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
5% damp custom.jsdebugger.open-large-minified-file.full-selection.DAMP linux1804-64-shippable-qr e10s fission stylo webrender 18,084.39 -> 18,986.79
5% damp custom.jsdebugger.open-large-minified-file.full-selection.DAMP windows10-64-shippable-qr e10s fission stylo webrender 9,011.65 -> 9,449.18

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38687

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: