[webkit-reviews] review denied: [Bug 3294] String.prototype.replace() fails with function as second param : [Attachment 2489] Handle the second argument being a function

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Mon Jun 20 08:49:01 PDT 2005


Darin Adler <darin at apple.com> has denied Anders Carlsson <andersca at mac.com>'s
request for review:
Bug 3294: String.prototype.replace() fails with function as second param
http://bugzilla.opendarwin.org/show_bug.cgi?id=3294

Attachment 2489: Handle the second argument being a function
http://bugzilla.opendarwin.org/attachment.cgi?id=2489&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
I think the args for the replacement function should be declared inside each if
statement. There's no reason to keep the args list around between invocations.

And if you name it args, then the code is going to be a bit smaller too.

Does this do the right thing when the replacement function raises a JavaScript
exception?

Extra space after substr before "(".

Minor issues; this looks pretty good.



More information about the webkit-reviews mailing list