Open Xotic750 opened 7 years ago
Here's the test webkit uses: https://bugs.webkit.org/attachment.cgi?id=306201&action=diff#JSTests/stress/double-array-to-array-storage.js_sec1
I'm not sure if it can be fixed, since it was a bug in the C++ JSObject inside webkit. I'll leave this open just in case tho.
I'm not sure how much it affects all array things on the whole, I do know that it can be detected and certain work-arounds for specific use cases can be implemented, but I don't know if a general fix for methods can be applied.
I had a look to see what could be done about this, whether there was a global fix that could done. I didn't find a way, but it did come up with this
https://github.com/Xotic750/create-array-fix-x
But can't test it because I have no access to Safari :( Thought I'd just post the info in case it comes in useful. :)
https://rawgit.com/Xotic750/create-array-fix-x/master/tests/index.html
It's by no means fully working (methods that return arrays are not correct), but it does show what could be possible, with a little more work.
https://bugs.webkit.org/show_bug.cgi?id=170264
Can be detected and fixed I believe? Quite large numbers of people affected that are using libraries such as big.js, bignumber.js and decimal.js. https://github.com/MikeMcl/bignumber.js/issues/120
Anyway, just a heads up.