<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>70998</bug_id>
          
          <creation_ts>2011-10-27 01:26:04 -0700</creation_ts>
          <short_desc>Date constructor handles infinite values incorrectly.</short_desc>
          <delta_ts>2012-01-06 02:29:10 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>EasyFix</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>75692</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter>mstarzinger</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>barraclough</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>491405</commentid>
    <comment_count>0</comment_count>
    <who name="">mstarzinger</who>
    <bug_when>2011-10-27 01:26:04 -0700</bug_when>
    <thetext>For cases in which the time value of a Date object is not a finite number, Date.prototype.toISOString() should throw a RangeError exception. This can either be reproduced by several Test262 test cases (i.e. 15.9.5.43-0-*) or with the following JavaScript snippet.

function test() {
  var date = new Date(Infinity, 1, 70, 0, 0, 0);
  try {
    date.toISOString();
    return false;
  } catch (e) {
    return e instanceof RangeError;
  }
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491689</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-10-27 10:27:11 -0700</bug_when>
    <thetext>Sounds much like bug 70394, but still happens in ToT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491743</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2011-10-27 11:15:57 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Sounds much like bug 70394, but still happens in ToT.

It is a different code path due to the Data constructor having different defined behavior when passing one argument, and two or more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>493184</commentid>
    <comment_count>3</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2011-10-31 00:12:42 -0700</bug_when>
    <thetext>To clarify Sam&apos;s comment, the issue re RangeErrors was fixed last week, in bug #70394 - the bug here is different.

The problem is not in toISOString, but rather in the call to new Date.  The test case assumes that the newly constructed Date has a NaN internal value; the bug is that it does not.  You can demonstrate that toISOString behaved correctly by changing the arguments to new Date to (&quot;&quot;) (which does correctly produce a Date with a NaN internal value).

Retitling the bug accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530917</commentid>
    <comment_count>4</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-01-05 21:29:45 -0800</bug_when>
    <thetext>Fixed in r104267</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>