<?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>4263</bug_id>
          
          <creation_ts>2005-08-01 22:40:55 -0700</creation_ts>
          <short_desc>Version bug: js1_2/version120/boolean-001.js</short_desc>
          <delta_ts>2011-06-13 17:10:54 -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>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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>
          
          <blocked>4262</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Geoffrey Garen">ggaren</assigned_to>
          <cc>barraclough</cc>
    
    <cc>digdog</cc>
    
    <cc>ian</cc>
    
    <cc>jhaygood</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>15674</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-08-01 22:40:55 -0700</bug_when>
    <thetext>This test fails because it expects new Boolean(false) to return false, as it did in JS 1.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34542</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Haygood">jhaygood</who>
    <bug_when>2006-02-28 21:20:39 -0800</bug_when>
    <thetext>Comparison to other JS engines without having a version set:

JS 1.6 (Firefox 1.5.0.1 / Windows)
* Returns False

JScript 5.6 (Internet Explorer 6 SP2 / Windows)
* Returns False

Should we follow this old behavior since JScript and JS both do this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34650</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-03-01 09:36:06 -0800</bug_when>
    <thetext>It looks like new Boolean(false) is supposed to return false in JS 1.5:

15.6.2.1 new Boolean(value)
The [[Prototype]] property of the newly constructed object is set to the original Boolean prototype object, the one that is the initial value of Boolean.prototype (15.6.3.1).

The [[Class]] property of the newly constructed Boolean object is set to &quot;Boolean&quot;.

The [[Value]] property of the newly constructed Boolean object is set to ToBoolean(value).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44507</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-11-24 23:05:13 -0800</bug_when>
    <thetext>*** Bug 11579 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44251</commentid>
    <comment_count>4</comment_count>
    <who name="">digdog</who>
    <bug_when>2006-11-26 00:50:43 -0800</bug_when>
    <thetext>The real cause that failed the test was IF statement.

var variable = new Boolean(false);
if (variable == false) print(&quot;EqualityExpression == RelationalExpression will be true&quot;);
if (variable) print(&quot;RelationalExpression will apply ToBollean operator on this Boolean &apos;object&apos;&quot;); // js1.2 sample use this, and expect the result of IF statement will be &apos;false&apos;

In the sample above, JSCore and other JS engines are acting the same, both these two IF statements will be true, since &apos;variable&apos; is a Boolean &apos;object&apos; not a &apos;boolean&apos; value, so the second IF statement will apply ToBollean(Object) and return true.

If you check js1_3/Boolean/boolean-001.js, you will see they already fixed this issue. (http://bugs.webkit.org/show_bug.cgi?id=11579#c7)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>420078</commentid>
    <comment_count>5</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2011-06-13 17:10:54 -0700</bug_when>
    <thetext>We don&apos;t support language versions in JSC (other than strict / non-strict), and al behaviour seems ES5 compliant.  I don&apos;t think we need change anything here - the test documents our deliberate non-compliance with JS1.2.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>