• mstarzinger@chromium.org's avatar
    Make __proto__ a foreign callback on Object.prototype. · ce1e10f5
    mstarzinger@chromium.org authored
    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
    ce1e10f5
regress-2441.js 1.75 KB