Use [[DefineOwnProperty]] to put 'constructor' field on the protoype object.
authorantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 18 Feb 2011 10:53:38 +0000 (10:53 +0000)
committerantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 18 Feb 2011 10:53:38 +0000 (10:53 +0000)
commite79bfcaf3f71f798b928c47055301a4727107221
treeec0e7a02da7dfcdce0d907bcffc5565c1e7c8af8
parent95892799e14544062ff075be51320c7bd4a41c23
Use [[DefineOwnProperty]] to put 'constructor' field on the protoype object.

That better follows ECMA-262 (see 13.2 Creating Function Objects) and allows
to ignore nasty JS accessors for 'constructor' property.

BUG=v8:1172
TEST=test/mjsunit/regress/regress-1172.js

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

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