Date.parse() fix

Darin Adler darin@apple.com
Mon, 13 Jan 2003 20:04:43 -0800


On Monday, January 13, 2003, at 12:18  PM, Harri Porten wrote:

> Inspired by Safari's fix for Date.parse() (return NaN rather than
> undefined on non-string arguments) I realized that the type check was
> wrong in the first place. The toString() conversion has to performed 
> first
> in call cases as somebody might pass e.g. a new'ed String object to the
> function.

Good point. I picked up the change for JavaScriptCore.

> Attached you'll find a patch which also results in a tiny performance
> optimization as a String conversion is avoided. It might not apply 
> cleanly
> against the JavaScriptCore sources but I'm sure you'll get the idea.

I took that UString change too. Thanks.

     -- Darin