@putByValDirect in Array.of and Array.from overwrites non-writable/configurable prope...
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jan 2017 23:30:57 +0000 (23:30 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jan 2017 23:30:57 +0000 (23:30 +0000)
commit148bab41b970b7cb44442afe65b3f95731ccc560
tree0948abd3f8569faf7867b3a609877fb85d97b89d
parent2799b7252e135b2dd15ab3638c32ea25a929b907
@putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
https://bugs.webkit.org/show_bug.cgi?id=153486

Reviewed by Saam Barati.

JSTests:

New regression test.

* stress/regress-153486.js: Added.
(shouldEqual):
(makeUnwriteableUnconfigurableObject):
(testArrayOf):
(testArrayFrom):
(runTest):

Source/JavaScriptCore:

Moved read only check in putDirect() to all paths.

* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putDirect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/regress-153486.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp