For the Object.freeze fix, not confident that forcing strong objects to always
take the slow path is a good solution, so consider this WIP.


https://codereview.chromium.org/1142393003/diff/20001/test/mjsunit/strong/object-freeze-property.js
File test/mjsunit/strong/object-freeze-property.js (right):

https://codereview.chromium.org/1142393003/diff/20001/test/mjsunit/strong/object-freeze-property.js#newcode33
test/mjsunit/strong/object-freeze-property.js:33:
Object.defineProperty(o, "foo", { enumerable:true, writable:true });
On 2015/05/22 14:15:29, rossberg wrote:
On 2015/05/22 14:07:08, conradw wrote:
> On 2015/05/22 13:10:28, rossberg wrote:
> > Nit: why care about enumerable in all these tests?
>
> The defineProperties case needs it to work, and I can't let it
varying or it
> will always throw.

Actually, I don't understand your use of defineProperties. AFAICT it
should be
something like

Object.defineProperties(o, {foo: {writable: false}})

whereas yours is equivalent to

Object.defineProperties(o, {foo: undefined})

which basically does nothing. Perhaps that's why you thought you need
enumerable
there?

Fixed now.

https://codereview.chromium.org/1142393003/diff/40001/src/v8natives.js
File src/v8natives.js (right):

https://codereview.chromium.org/1142393003/diff/40001/src/v8natives.js#newcode689
src/v8natives.js:689: MakeTypeError(kStrongRedefineDisallowed, o, p) :
On 2015/05/22 14:15:29, rossberg wrote:
Nit: style guide wants ? and : each first on the next line, plus
indentation by
4

Done.

https://codereview.chromium.org/1142393003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to