2013/4/21 Allen Wirfs-Brock <[email protected]>
> Also note that JSON.parse('{"__proto__": null}') does not create an object
> whose [[Protoype]] is null because JSON.parse uses [[DefineOwnProperty]] to
> create all its properties so this will just result in an own property whose
> value is null.
Side-tracking the discussion but perhaps someone will find it interesting:
That varies with JS implementations. v8 as of Chrome and Node stable
sets [[Prototype]] so you can cause all kinds of crazy things
happening by doing a JSON.parse('{"__proto__": null}'),
JSON.parse('{"__proto__": []}') or why not a JSON.parse('{"__proto__":
{"sessionid": "cantbedeleted"}}'). v8 bleeding edge and Chrome Canary
has fixed this. https://code.google.com/p/v8/issues/detail?id=621 for
more info.
/Olov
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss