Fix Object.freeze for objects with mixed accessors and data properties
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 27 May 2013 10:56:27 +0000 (10:56 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 27 May 2013 10:56:27 +0000 (10:56 +0000)
commit9d3e7e5b81cc8e5cd9d4e8f9028122ea56a1f2c2
tree7f74573bae5a47050ab5dc9765023d02830e78eb
parent3e4183472144a23c9bd65603de020a32b3bbdbf5
Fix Object.freeze for objects with mixed accessors and data properties

The bug in the existing code was that it modified the |attributes|
local variable on its way through the loop in CopyUpToAddAttributes.
But that affected any properties updated after an accessor property.
The code now sets up a mask each time and applies that instead of
mutating |attributes|.

R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16051002

Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/objects.cc
test/mjsunit/object-freeze.js