Use ForceSetObjectProperty in DefineOrRedefineDataProperty (fixes crbug 72736).
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Feb 2011 10:43:21 +0000 (10:43 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 14 Feb 2011 10:43:21 +0000 (10:43 +0000)
commit34eeb88ee47b39dee14905fd41dc11b93da4f37d
treed4b829d91a94518d42c01732b5fc8d10fcb346cc
parent6d9fde492c9e1ad23058c81dfcb13fc380358ca7
Use ForceSetObjectProperty in DefineOrRedefineDataProperty (fixes crbug 72736).

The current version uses SetObjectProperty which will not set the
value in case this is a readonly property. The spec explictly says
that a configurable but non writable property can have its value
changed with Object.defineProperty (because the same thing can be
accomplished by doing 3 calls (set writable to true, update the value,
set writable to false).

Review URL: http://codereview.chromium.org/6518004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/runtime.cc
src/v8natives.js
test/mjsunit/regress/regress-crbug-72736.js [new file with mode: 0644]