[webkit-reviews] review granted: [Bug 33319] RegExp.prototype.toString returns "//" for empty regular expressions : [Attachment 46135] Revised patch (update Mozilla tests, add comment)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 8 07:49:59 PST 2010
Darin Adler <darin at apple.com> has granted Kent Hansen <kent.hansen at nokia.com>'s
request for review:
Bug 33319: RegExp.prototype.toString returns "//" for empty regular expressions
https://bugs.webkit.org/show_bug.cgi?id=33319
Attachment 46135: Revised patch (update Mozilla tests, add comment)
https://bugs.webkit.org/attachment.cgi?id=46135&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
> + // If source is empty, use "/(?:)/" to avoid colliding with comment
syntax
We use periods in sentence-style comments like this one.
> + return jsNontrivialString(exec, makeString("/", source.size() ? source :
UString("(?:)"), postfix));
I would write it like this:
return jsNontrivialString(exec, isEmpty() ? UString("(?:)" :
makeString("/", source, postfix));
r=me as is because neither of those comments are important
More information about the webkit-reviews
mailing list