Closed YiWen-y closed 3 years ago
This definitely looks like a bug - we're not checking the prototype for the setter.
Looking at it our Push implementation doesn't check for setters at all on prototype or the object itself.
Easiest fix would be to reimplement push as self-hosted javascript - not sure what the performance impact would be though.
I'll look at doing this after #6583
I've written a fix BUT it slaughtered the performance on some of our benchmarks need to either look at conditional ways to optimise JS builtins or do a native fix rather than a self-hosted JS fix.
Version
chakra-1.11.24
Test case
Execution steps
Output
Expected behavior
Description
When executing the above test case, when executing
arr.push
in line 14, other engines (such as v8, SpiderMonkey, JavascriptCore, etc.) all call theset
method defined in line 8, and then execute theget
method defined in line 4. However, chakra does not seem to do this. Is this a bug in chakra implementation?