Status: New
Owner: ----

New issue 1983 by [email protected]: 'source' property of RegExp instance cannot be ""
http://code.google.com/p/v8/issues/detail?id=1983

15.10.6.4 specifies that RegExp.prototype.toString must return '/' + source + '/', and also states that the result must be a valid RegularExpressionLiteral. '//' is not a valid RegularExpressionLiteral (since it is a single line comment), and hence source cannot ever validly be "". If the source is empty, return a different Pattern that would match the same thing.

JSC already fixed the bug in https://bugs.webkit.org/show_bug.cgi?id=79938. We need a similar fix in V8.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to