Closed Bug 1608983 Opened 4 years ago Closed 4 years ago

Don't check regexp syntax twice

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: iain, Assigned: iain)

Details

Attachments

(1 file)

The JS spec says that syntax errors in regular expressions should be early errors. (V8 doesn't do this, but that's another matter.) To enforce this during both syntax and full parse, we parse the pattern, verify that it parsed correctly, then throw the result away.

At a bare minimum, we shouldn't have to do this twice. If we are full parsing something that has already been syntax parsed, this patch skips the regexp syntax check.

Priority: -- → P1
Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f9b4e031bb09
Don't check regexp syntax in full parse if we've already done so during syntax parse r=arai
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: