Last Comment Bug 527027 - date_makeDate regression
: date_makeDate regression
Status: RESOLVED FIXED
fixed-in-tracemonkey
: regression
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Igor Bukanov
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 524121
  Show dependency treegraph
 
Reported: 2009-11-06 09:16 PST by Igor Bukanov
Modified: 2009-11-25 11:48 PST (History)
8 users (show)
sayrer: blocking1.9.2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
beta5-fixed
.6+
.6-fixed


Attachments
fixing the typo (712 bytes, patch)
2009-11-06 15:07 PST, Igor Bukanov
brendan: review+
Details | Diff | Splinter Review

Description Igor Bukanov 2009-11-06 09:16:18 PST
In the patch for bug 524121 I regressed date_setDate so it no longer sets the vp out parameter to NaN when argc == 0. The following test case explicitly checks for that:

function check_nan(x)
{
    if (typeof x == "number" && isNaN(x))
        return;
    throw Error("The result is not NaN: "+uneval(x));
}

var d = new Date();
check_nan(d.setTime());         
check_nan(d.setYear());         
check_nan(d.setFullYear());     
check_nan(d.setUTCFullYear());  
check_nan(d.setMonth());        
check_nan(d.setUTCMonth());     
check_nan(d.setDate());         
check_nan(d.setUTCDate());      
check_nan(d.setHours());        
check_nan(d.setUTCHours());     
check_nan(d.setMinutes());      
check_nan(d.setUTCMinutes());   
check_nan(d.setSeconds());      
check_nan(d.setUTCSeconds());   
check_nan(d.setMilliseconds()); 
check_nan(d.setUTCMilliseconds());
Comment 1 Igor Bukanov 2009-11-06 15:04:24 PST
The bug is a regression from a bug that is 1.9.2 blocker.
Comment 2 Igor Bukanov 2009-11-06 15:07:48 PST
Created attachment 410879 [details] [diff] [review]
fixing the typo

This fixes the regression that I did when refactored SetDateToNan logic.
Comment 4 Igor Bukanov 2009-11-12 06:55:45 PST
The issue is fixed on 1.9.1 as the back ported patch for the bug 524121 includes this fix.
Comment 7 Samuel Sidler (old account; do not CC) 2009-11-25 11:48:10 PST
These bugs landed after b4 was cut. Moving flag out.

Note You need to log in before you can comment on or make changes to this bug.