<?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>20049</bug_id>
          
          <creation_ts>2008-07-16 01:26:38 -0700</creation_ts>
          <short_desc>testapi failure: MyObject - 0 should be NaN but instead is 1.</short_desc>
          <delta_ts>2009-03-21 20:04:38 -0700</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>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Cameron Zwarich (cpst)">zwarich</assigned_to>
          <cc>sam</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86013</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-07-16 01:26:38 -0700</bug_when>
    <thetext>Testapi is reporting a failure with r35197:

__FAIL__: MyObject - 0 should be NaN but instead is 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86014</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-07-16 01:27:41 -0700</bug_when>
    <thetext>&lt;rdar://problem/6079127&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98189</commentid>
    <comment_count>2</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2008-11-10 12:16:04 -0800</bug_when>
    <thetext>*** Bug 18037 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111125</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2009-02-25 23:48:42 -0800</bug_when>
    <thetext>I think the test result here is correct. In the ECMA spec, subtraction uses ToNumber, not ToPrimitive, but the test file says this, where the second test is the failing test:

shouldBe(&quot;+MyObject&quot;, 1); // toNumber
...
shouldBe(&quot;MyObject - 0&quot;, NaN); // toPrimitive

Addition uses ToPrimitive, and the result of the equivalent addition test may be wrong, but that&apos;s a different question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111128</commentid>
    <comment_count>4</comment_count>
      <attachid>28007</attachid>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2009-02-25 23:56:03 -0800</bug_when>
    <thetext>Created attachment 28007
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114673</commentid>
    <comment_count>5</comment_count>
      <attachid>28007</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-03-21 19:24:05 -0700</bug_when>
    <thetext>Comment on attachment 28007
Proposed patch

r=me, but i&apos;d really like it if we could come up with something that would attempt a toPrimitive conversion -- possibly another custom object?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114676</commentid>
    <comment_count>6</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2009-03-21 20:04:38 -0700</bug_when>
    <thetext>Fixed in r41896. I agree with your comment, Oliver.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>28007</attachid>
            <date>2009-02-25 23:56:03 -0800</date>
            <delta_ts>2009-03-21 19:24:05 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>testapi.diff</filename>
            <type>text/plain</type>
            <size>1331</size>
            <attacher name="Cameron Zwarich (cpst)">zwarich</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDQxMjQz
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYgQEAKKzIwMDktMDIt
MjUgIENhbWVyb24gWndhcmljaCAgPGN3endhcmljaEB1d2F0ZXJsb28uY2E+CisKKyAgICAgICAg
UmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgQnVnIDIwMDQ5OiB0ZXN0YXBp
IGZhaWx1cmU6IE15T2JqZWN0IC0gMCBzaG91bGQgYmUgTmFOIGJ1dCBpbnN0ZWFkIGlzIDEuCisg
ICAgICAgIDxodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjAwNDk+Cisg
ICAgICAgIDxyZGFyOi8vcHJvYmxlbS82MDc5MTI3PgorCisgICAgICAgIEluIHRoaXMgY2FzZSwg
dGhlIHRlc3QgaXMgd3JvbmcuIEFjY29yZGluZyB0byB0aGUgRUNNQSBzcGVjLCBzdWJ0cmFjdGlv
bgorICAgICAgICB1c2VzIFRvTnVtYmVyLCBub3QgVG9QcmltaXRpdmUuIENoYW5nZSB0aGUgdGVz
dCB0byBtYXRjaCB0aGUgc3BlYy4KKworICAgICAgICAqIEFQSS90ZXN0cy90ZXN0YXBpLmpzOgor
CiAyMDA5LTAyLTI1ICBDYW1lcm9uIFp3YXJpY2ggIDxjd3p3YXJpY2hAdXdhdGVybG9vLmNhPgog
CiAgICAgICAgIFJldmlld2VkIGJ5IEdhdmluIEJhcnJhY2xvdWdoLgpJbmRleDogQVBJL3Rlc3Rz
L3Rlc3RhcGkuanMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PQotLS0gQVBJL3Rlc3RzL3Rlc3RhcGkuanMJKHJldmlzaW9u
IDQxMjMzKQorKysgQVBJL3Rlc3RzL3Rlc3RhcGkuanMJKHdvcmtpbmcgY29weSkKQEAgLTEwMCw3
ICsxMDAsNyBAQCBzaG91bGRCZSgiTXlPYmplY3QgPyAxIDogMCIsIHRydWUpOyAvLyB0CiBzaG91
bGRCZSgiK015T2JqZWN0IiwgMSk7IC8vIHRvTnVtYmVyCiBzaG91bGRCZSgiKE15T2JqZWN0LnRv
U3RyaW5nKCkpIiwgIltvYmplY3QgTXlPYmplY3RdIik7IC8vIHRvU3RyaW5nCiBzaG91bGRCZSgi
U3RyaW5nKE15T2JqZWN0KSIsICJNeU9iamVjdEFzU3RyaW5nIik7IC8vIHR5cGUgY29udmVyc2lv
biB0byBzdHJpbmcKLXNob3VsZEJlKCJNeU9iamVjdCAtIDAiLCBOYU4pOyAvLyB0b1ByaW1pdGl2
ZQorc2hvdWxkQmUoIk15T2JqZWN0IC0gMCIsIDEpOyAvLyB0b051bWJlcgogCiBzaG91bGRCZSgi
dHlwZW9mIE15Q29uc3RydWN0b3IiLCAib2JqZWN0Iik7CiBjb25zdHJ1Y3RlZE9iamVjdCA9IG5l
dyBNeUNvbnN0cnVjdG9yKDEpOwo=
</data>
<flag name="review"
          id="13647"
          type_id="1"
          status="+"
          setter="oliver"
    />
          </attachment>
      

    </bug>

</bugzilla>