Make __proto__ a foreign callback on Object.prototype.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 26 Feb 2013 10:46:00 +0000 (10:46 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 26 Feb 2013 10:46:00 +0000 (10:46 +0000)
commitce1e10f5fc8c2a608f476aabc4d4c9f3a9ce140a
treef56a77e7f60851156349eabdeb80ff83b93b9df2
parent72b802f27a5cf767d894458272e2f2e3d3c3ebaf
Make __proto__ a foreign callback on Object.prototype.

This moves the __proto__ property to Object.prototype and turns it into
a callback property actually present in the descriptor array as opposed
to a hack in the properties lookup. For now it still is a "magic" data
property using foreign callbacks and not an accessor property visible to
JavaScript.

The second effect of this change is that JSON.parse() no longer treats
the __proto__ property specially, it will be defined as any other data
property. Note that object literals still have their special handling.

R=rossberg@chromium.org
BUG=v8:621,v8:1949,v8:2441
TEST=mjsunit,cctest,test262

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
13 files changed:
src/bootstrapper.cc
src/factory.cc
src/factory.h
src/json-parser.h
src/objects.cc
src/property.h
test/cctest/test-api.cc
test/mjsunit/builtins.js
test/mjsunit/harmony/object-observe.js
test/mjsunit/harmony/proxies.js
test/mjsunit/json.js
test/mjsunit/regress/regress-2441.js [new file with mode: 0644]
test/test262/test262.status