Status: New
Owner: ----
New issue 1309 by [email protected]: __proto__ should not be mutable if
object is not Extensible
http://code.google.com/p/v8/issues/detail?id=1309
var p = {};
var o = Object.freeze({});
o.__proto__ = p;
print(o.__proto__ === p);
8.6.2 Object Internal Methods
...
Every ECMAScript object has a Boolean-valued [[Extensible]] internal
property that controls whether or not named properties may be added to the
object. If the value of the [[Extensible]] internal property is false then
additional named properties may not be added to the object. In addition, if
[[Extensible]] is false the value of the [[Class]] and [[Prototype]]
internal properties of the object may not be modified. Once the value of an
[[Extensible]] internal property has been set to false it may not be
subsequently changed to true.
NOTE This specification defines no ECMAScript language operators or
built-in functions that permit a program to modify an object’s [[Class]] or
[[Prototype]] internal properties or to change the value of [[Extensible]]
from false to true. Implementation specific extensions that modify
[[Class]], [[Prototype]] or [[Extensible]] must not violate the invariants
defined in the preceding paragraph.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev