**Step to reproduce:** const proxy = new Proxy([3, 4], {}); const res = [1, 2].concat(proxy); console.log(res[0]); console.log(res[1]); console.log(res[2]); console.log(res[3]); **Expected output:** 1 2 3 4 **Actual output:** 1 2 Proxy {0: 3, 1: 4} undefined **Observation:** Works in Chrome 65 and Firefox 58
<rdar://problem/39256680>
Created attachment 341460 [details] Patch
Comment on attachment 341460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341460&action=review > Source/JavaScriptCore/ChangeLog:11 > + This incorrectly treated prevented Proxy objects from being spread when “treated prevented” => prevented > Source/JavaScriptCore/ChangeLog:12 > + they were the only argument passed to A.p.concat(), violating ECMA-262. Nit: I’d just spell out Array.prototype.concat > JSTests/ChangeLog:8 > + Before this patch, the fast case for Array.prototype.concat was taken if Don’t think you need to repeat the same text in this changelog here
Created attachment 341489 [details] Patch for landing
Comment on attachment 341489 [details] Patch for landing I think this patch is still slightly wrong, going to verify a bit..
Comment on attachment 341489 [details] Patch for landing nevermind, I guess it was ok after all..
Comment on attachment 341489 [details] Patch for landing Clearing flags on attachment: 341489 Committed r232261: <https://trac.webkit.org/changeset/232261>
All reviewed patches have been landed. Closing bug.
Reopening to attach new patch.
Created attachment 341520 [details] Patch
I didn't know we had a new test262 runner in the tree. This patch fixed some failures, so here's another patch to fix the test262 expectations.
Comment on attachment 341520 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341520&action=review > JSTests/ChangeLog:3 > + > + Only need one new line here
Created attachment 341538 [details] Patch for landing
Comment on attachment 341538 [details] Patch for landing Clearing flags on attachment: 341538 Committed r232282: <https://trac.webkit.org/changeset/232282>
*** Bug 186991 has been marked as a duplicate of this bug. ***
*** Bug 186993 has been marked as a duplicate of this bug. ***
*** Bug 186992 has been marked as a duplicate of this bug. ***