Closed
Bug 346363
Opened 20 years ago
Closed 20 years ago
setFullYear() (with no arguments) seems to clobber a Date object
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: ispiked, Assigned: feng.qian.moz)
Details
(Keywords: testcase, verified1.8.1)
Attachments
(2 files, 1 obsolete file)
|
2.33 KB,
text/plain
|
Details | |
|
914 bytes,
patch
|
mrbkap
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
On 1.5, 1.8, and trunk.
Steps to reproduce:
1. ./run-mozilla.sh ./xpcshell
2. js> var d = new Date()
js> var foo = new Date()
js> foo.setFullYear()
NaN
js> foo.setFullYear(2006)
NaN
js> foo.getFullYear()
NaN
Results:
Calling setFullYear() without any arguments on a Date object seems to clobber it, not allowing it to be modified anymore.
Expected results:
setFullYear(2006) should be able to set the full year of the Date object.
| Reporter | ||
Comment 1•20 years ago
|
||
Figured I'd have a go at making a regression testcase for this.
| Reporter | ||
Comment 2•20 years ago
|
||
| Reporter | ||
Updated•20 years ago
|
Attachment #231169 -
Attachment is obsolete: true
Comment 3•20 years ago
|
||
(In reply to comment #2)
> Created an attachment (id=231171) [edit]
> regression testcase (corrected)
Looks good on a quick glance. Lets see what the masters of javascript say before we go further.
| Assignee | ||
Comment 4•20 years ago
|
||
It seems someone typed wrong varaible name. The comment says that if it should be setting Year if maxargs is 3. I verified with the first test case, it should work correctly.
Attachment #231184 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Updated•20 years ago
|
Assignee: general → feng.qian.moz
Status: ASSIGNED → NEW
Updated•20 years ago
|
Attachment #231184 -
Flags: review?(mrbkap) → review+
Comment 5•20 years ago
|
||
Fix checked into trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 6•20 years ago
|
||
Checking in regress-346363.js;
/cvsroot/mozilla/js/tests/js1_5/Date/regress-346363.js,v <-- regress-346363.js
initial revision: 1.1
Flags: in-testsuite+
Comment 7•20 years ago
|
||
verified fixed 1.9 _but not 1.8_ window/mac(ppc|tel)/linux 20060803.
Status: RESOLVED → VERIFIED
OS: Linux → All
Version: 1.8 Branch → Trunk
Updated•20 years ago
|
Attachment #231184 -
Flags: approval1.8.1?
Comment 8•20 years ago
|
||
Comment on attachment 231184 [details] [diff] [review]
patch
a=schrep
Attachment #231184 -
Flags: approval1.8.1? → approval1.8.1+
Comment 9•20 years ago
|
||
This is _not_ fixed on 1.8 and is at risk of missing Firefox 2. Please check this in to MOZILLA_1_8_BRANCH and add the fixed1.8.1 keyword when you have done so.
Whiteboard: [at risk]
Comment 11•20 years ago
|
||
verified fixed 1.8.1 20060811 windows/mac(ppc|tel)/linux
Keywords: fixed1.8.1 → verified1.8.1
Updated•20 years ago
|
Whiteboard: [at risk]
You need to log in
before you can comment on or make changes to this bug.
Description
•