WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43793
Date("") should be an invalid date time
https://bugs.webkit.org/show_bug.cgi?id=43793
Summary
Date("") should be an invalid date time
Leo Yang
Reported
2010-08-10 08:09:45 PDT
Date("") should be an invalid date time. isNaN(new Date("")) should return true.
Attachments
Patch
(3.56 KB, patch)
2010-08-10 08:21 PDT
,
Leo Yang
ggaren
: review-
Details
Formatted Diff
Diff
Patch - fix commit message and comments
(3.83 KB, patch)
2010-08-11 07:28 PDT
,
Leo Yang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Leo Yang
Comment 1
2010-08-10 08:21:13 PDT
Created
attachment 64013
[details]
Patch
Geoffrey Garen
Comment 2
2010-08-10 10:48:36 PDT
Comment on
attachment 64013
[details]
Patch Why should new Date("") be NaN? Can you point to a part of a spec, or the behavior of another browser? As a general rule, it's better for your ChangeLog to explain the why, rather than the what.
> cachedDateString = UString(); > + cachedDateStringValue = NaN;
Can you explain why you needed to make this change? UString() should not be == to UString(""). If it is, I think we have another bug to solve.
Leo Yang
Comment 3
2010-08-10 11:09:35 PDT
(In reply to
comment #2
)
> (From update of
attachment 64013
[details]
) > Why should new Date("") be NaN? Can you point to a part of a spec, or the behavior of another browser? As a general rule, it's better for your ChangeLog to explain the why, rather than the what.
For IE and FireFox, new Date("") is NaN.
> > > cachedDateString = UString(); > > + cachedDateStringValue = NaN; > > Can you explain why you needed to make this change?
There isn't initial value for cachedDateStringValue. Do we depend on the first assignment when Date cache is hit? After we call restDateCache(), we leave cachedDateStringValue and reset cachedDateString, it's not consistent.
> > UString() should not be == to UString(""). If it is, I think we have another bug to solve.
Yes, I don't know why UString() == UString(""). This also need to be fixed.
Leo Yang
Comment 4
2010-08-11 07:28:37 PDT
Created
attachment 64112
[details]
Patch - fix commit message and comments
Geoffrey Garen
Comment 5
2010-08-11 12:16:45 PDT
Comment on
attachment 64112
[details]
Patch - fix commit message and comments r=me
WebKit Commit Bot
Comment 6
2010-08-11 17:31:35 PDT
Comment on
attachment 64112
[details]
Patch - fix commit message and comments Clearing flags on attachment: 64112 Committed
r65201
: <
http://trac.webkit.org/changeset/65201
>
WebKit Commit Bot
Comment 7
2010-08-11 17:31:39 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug