Make Function.length and Function.name configurable properties.
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 7 Feb 2014 14:55:30 +0000 (14:55 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 7 Feb 2014 14:55:30 +0000 (14:55 +0000)
commit7317b71f02597143cf3155e5357673024598e173
tree7cc6393756023aff5afd22027d0a494d0b9fc58a
parentdb1a685b8f250b99ffda15346e56efd501166193
Make Function.length and Function.name configurable properties.

ES6 makes the Function object properties "length" and "name"
configurable; switch the implementation over to follow that.

Doing so exposed a problem in the handling of non-writable, but
configurable properties backed by foreign callback accessors
internally. As an optimization, if such an accessor property is
re-defined with a new value, its setter was passed the new value
directly, keeping the property as an accessor property. However, this
is not correct should the property be non-writable, as its setter will
then simply ignore the updated value. Adjust the enabling logic for
this optimization accordingly, along with adding a test.

LOG=N
R=rossberg@chromium.org, rossberg
BUG=v8:3045

Review URL: https://codereview.chromium.org/116083006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/bootstrapper.cc
src/runtime.cc
test/cctest/test-accessors.cc
test/mjsunit/harmony/object-observe.js
test/mjsunit/regress/regress-1530.js
test/mjsunit/regress/regress-270142.js
test/mjsunit/regress/regress-function-length-strict.js