[Webkit-unassigned] [Bug 71572] String new RegExp('\n').toString() returns is invalid RegularExpressionLiteral

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 15 12:18:16 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=71572





--- Comment #4 from Yusuke Suzuki <utatane.tea at gmail.com>  2011-11-15 12:18:16 PST ---
(In reply to comment #3)
> (From update of attachment 113682 [details])
> Good catch & nice fix. But I think we may want to make one tweak to this patch before landing.  Most regular expressions don't contain forwards slashes or newlines, but this patch will always produce a fresh copy of the string every time source is called. Currently the code has an early return for strings that don't contain a forwards slash. We could expand this to also check for newline characters, and early return if the string contains neither forward slashes or newlines. r- for the loss of this optimization, but r+ in principle, we should definitely take this fix & the code looks great otherwise. :-)

Thanks for your review. You're right. I'll add early return to this patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list