WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146339
Array destructuring seems to not follow the ES6 spec
https://bugs.webkit.org/show_bug.cgi?id=146339
Summary
Array destructuring seems to not follow the ES6 spec
Boris Zbarsky
Reported
2015-06-26 02:02:26 PDT
Consider this testcase: var y = "FAIL"; Object.defineProperty(Array.prototype, 0, { get: function() { y = "PASS"; } }); var [,x] = [,1]; alert(y); per spec, this should alert "PASS". In Safari (and in a WebKit nightly), this alerts "FAIL".
Attachments
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2015-06-26 02:10:02 PDT
I guess this is fixed by this commit[1]. I've tried it with
r185990
's JSC shell and get "PASS". var y = "FAIL"; Object.defineProperty(Array.prototype, 0, { get: function() { y = "PASS"; } }); var [,x] = [,1]; print(y); Could you tell me the revision number? [1]:
http://trac.webkit.org/changeset/185853
Yusuke Suzuki
Comment 2
2015-06-26 02:12:24 PDT
Ah, this commit[1]. [1]:
http://trac.webkit.org/changeset/185791
Boris Zbarsky
Comment 3
2015-06-26 02:16:03 PDT
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's fixed in
r185958
. Sorry for the spurious bug report. :(
Yusuke Suzuki
Comment 4
2015-06-26 02:17:24 PDT
(In reply to
comment #3
)
> 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's fixed in
r185958
. Sorry for the spurious bug > report. :(
No problem!! I'm looking forward to seeing your reports about the other ES6 edge case areas!!!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug