<?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>146339</bug_id>
          
          <creation_ts>2015-06-26 02:02:26 -0700</creation_ts>
          <short_desc>Array destructuring seems to not follow the ES6 spec</short_desc>
          <delta_ts>2015-06-26 02:17:24 -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>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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>38410</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Boris Zbarsky">bzbarsky</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>arv</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1104886</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-06-26 02:02:26 -0700</bug_when>
    <thetext>Consider this testcase:

  var y = &quot;FAIL&quot;;
  Object.defineProperty(Array.prototype, 0, { get: function() { y = &quot;PASS&quot;; } });
  var [,x] = [,1];
  alert(y);

per spec, this should alert &quot;PASS&quot;.  In Safari (and in a WebKit nightly), this alerts &quot;FAIL&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104890</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-06-26 02:10:02 -0700</bug_when>
    <thetext>I guess this is fixed by this commit[1].

I&apos;ve tried it with r185990&apos;s JSC shell and get &quot;PASS&quot;.

var y = &quot;FAIL&quot;;
Object.defineProperty(Array.prototype, 0, { get: function() { y = &quot;PASS&quot;; } });
var [,x] = [,1];
print(y);

Could you tell me the revision number?

[1]: http://trac.webkit.org/changeset/185853</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104891</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-06-26 02:12:24 -0700</bug_when>
    <thetext>Ah, this commit[1].

[1]: http://trac.webkit.org/changeset/185791</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104892</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-06-26 02:16:03 -0700</bug_when>
    <thetext>Looks like I was on r185625.  

I can confirm that http://trac.webkit.org/changeset/185791 looks like it should fix this, and that it&apos;s fixed in r185958.  Sorry for the spurious bug report.  :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1104893</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2015-06-26 02:17:24 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Looks like I was on r185625.  
&gt; 
&gt; I can confirm that http://trac.webkit.org/changeset/185791 looks like it
&gt; should fix this, and that it&apos;s fixed in r185958.  Sorry for the spurious bug
&gt; report.  :(

No problem!! I&apos;m looking forward to seeing your reports about the other ES6 edge case areas!!!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>