<?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>6267</bug_id>
          
          <creation_ts>2005-12-27 20:26:00 -0800</creation_ts>
          <short_desc>Fix Number.prototype.toFixed/toExponential(undefined)</short_desc>
          <delta_ts>2005-12-29 03:49:09 -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>420+</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Maks Orlovich">maksim</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26911</commentid>
    <comment_count>0</comment_count>
    <who name="Maks Orlovich">maksim</who>
    <bug_when>2005-12-27 20:26:00 -0800</bug_when>
    <thetext>The attached fixes the two functions to properly handle being passed undefined 
as per spec, and not to exception. toFixed is supposed to handle it as 0; 
while toExponential has special handling; that was implemented, but was 
prevented from running by a wrong range check. This is tested by KJS&apos;s 
Number.js</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26912</commentid>
    <comment_count>1</comment_count>
      <attachid>5323</attachid>
    <who name="Maks Orlovich">maksim</who>
    <bug_when>2005-12-27 20:26:52 -0800</bug_when>
    <thetext>Created attachment 5323
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26915</commentid>
    <comment_count>2</comment_count>
      <attachid>5323</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-12-27 21:29:43 -0800</bug_when>
    <thetext>Comment on attachment 5323
patch

r=me

The second throwError message needs the verb &quot;be&quot; before this lands.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27033</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-12-28 10:35:04 -0800</bug_when>
    <thetext>We need to land the Number.js test too with this patch -- can&apos;t land a patch without a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27039</commentid>
    <comment_count>4</comment_count>
    <who name="Maks Orlovich">maksim</who>
    <bug_when>2005-12-28 10:41:46 -0800</bug_when>
    <thetext>Maciej landed the entire KJS testsuite. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27121</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-12-29 03:49:09 -0800</bug_when>
    <thetext>Landed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5323</attachid>
            <date>2005-12-27 20:26:52 -0800</date>
            <delta_ts>2005-12-27 21:29:43 -0800</delta_ts>
            <desc>patch</desc>
            <filename>undef.diff</filename>
            <type>text/plain</type>
            <size>1001</size>
            <attacher name="Maks Orlovich">maksim</attacher>
            
              <data encoding="base64">SW5kZXg6IG51bWJlcl9vYmplY3QuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIG51bWJlcl9vYmplY3QuY3Bw
CShyZXZpc2lvbiA0OTE2NzUpCisrKyBudW1iZXJfb2JqZWN0LmNwcAkod29ya2luZyBjb3B5KQpA
QCAtMTYwLDYgKzE5Miw4IEBAIFZhbHVlSW1wICpOdW1iZXJQcm90b0Z1bmNJbXA6OmNhbGxBc0Z1
bmMKICAgewogICAgICAgVmFsdWVJbXAgKmZyYWN0aW9uRGlnaXRzID0gYXJnc1swXTsKICAgICAg
IGRvdWJsZSBkZiA9IGZyYWN0aW9uRGlnaXRzLT50b0ludGVnZXIoZXhlYyk7CisgICAgICBpZiAo
ZnJhY3Rpb25EaWdpdHMtPmlzVW5kZWZpbmVkKCkpCisgICAgICAgICAgICBkZiA9IDA7CiAgICAg
ICBpZiAoIShkZiA+PSAwICYmIGRmIDw9IDIwKSkgLy8gdHJ1ZSBmb3IgTmFOCiAgICAgICAgICAg
cmV0dXJuIHRocm93RXJyb3IoZXhlYywgUmFuZ2VFcnJvciwgInRvRml4ZWQoKSBkaWdpdHMgYXJn
dW1lbnQgbXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDIwIik7CiAgICAgICBpbnQgZiA9IChpbnQpZGY7
CkBAIC0yMDUsNyArMjM5LDcgQEAgVmFsdWVJbXAgKk51bWJlclByb3RvRnVuY0ltcDo6Y2FsbEFz
RnVuYwogICAgICAgCiAgICAgICBWYWx1ZUltcCAqZnJhY3Rpb25EaWdpdHMgPSBhcmdzWzBdOwog
ICAgICAgZG91YmxlIGRmID0gZnJhY3Rpb25EaWdpdHMtPnRvSW50ZWdlcihleGVjKTsKLSAgICAg
IGlmICghKGRmID49IDAgJiYgZGYgPD0gMjApKSAvLyB0cnVlIGZvciBOYU4KKyAgICAgIGlmICgh
ZnJhY3Rpb25EaWdpdHMtPmlzVW5kZWZpbmVkKCkgJiYgIShkZiA+PSAwICYmIGRmIDw9IDIwKSkg
Ly8gdHJ1ZSBmb3IgTmFOCiAgICAgICAgICAgcmV0dXJuIHRocm93RXJyb3IoZXhlYywgUmFuZ2VF
cnJvciwgInRvRXhwb25lbnRpYWwoKSBhcmd1bWVudCBtdXN0IGJldHdlZW4gMCBhbmQgMjAiKTsK
ICAgICAgIGludCBmID0gKGludClkZjsKICAgICAgIAo=
</data>
<flag name="review"
          id="1123"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>