[Webkit-unassigned] [Bug 6257] Throw errors on invalid expressions/support non-PCRE regexp (KJS merge)
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Wed Jan 11 09:50:12 PST 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=6257
------- Additional Comments From ggaren at apple.com 2006-01-11 09:50 -------
RegExp("\\u" + "0020") is a really interesting case -- something I hadn't considered. Both Firefox and
MacIE honor it, and a quick reading of the spec suggests it's required, so, yes, that rules out the lexer
solution.
I'm not sure if we still care about supporting the POSIX library. Darin? Are there any platforms on which
we can't use PCRE? Regardless, I think the 2-pass approach is worth it. It would just require factoring
the Unicode escape converting code into its own function and calling that function as a fallback when
the regular expression compiler returns an error.
With your patch applied, ecma_3/RegExp/regress-119909.js doesn't fail because it crashes. Rather,
where we used to silently ignore the regular expression, we now throw an error. And our test suite
interprets thrown errors as failures. Since we expect this test to throw an error, the simplest solution is
to surround the test code in a try/catch block. The expectation for the test can remain the same.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list