Comment 27 for bug 908508

Revision history for this message
In , Christopher-leary (christopher-leary) wrote :

(In reply to Landry Breuil from comment #18)
> Another annoyance was the landing of bug #673188, which right now #errors
> out if ENABLE_YARR_JIT is unset (see RegExpObject.cpp, function
> checkSyntax()), pretty unfriendly. So far i've replaced it by a return true,
> but it's of course ugly.

It's required for lazy regular expression compilation -- you have to detect errors in the syntax immediately for error reporting purposes. Continuing to use the YARR parser to report errors when you're using the PCRE backend could result in a mismatch where the PCRE parser believes there to be an error in the pattern that YARR did not detect, which would result in incorrect semantics (because you have no way of reporting the error when you're doing the lazy compilation).

Sorry, I should have put a comment in if I didn't!