Status: Accepted Owner: ---- Labels: Type-Bug Priority-Medium
New issue 618 by [email protected]: Simple constructors does not handle adding setters
http://code.google.com/p/v8/issues/detail?id=618 A simple constructor is a function where there are only statements of the form this.x = ... where ... is either a constant or an argument, e.g. function C() { this.x = 23; } If a setter is added to the prototype chain of a simple constructor setting one of the properties assigned in the constructor then this setter is ignored when constructing new objects from the constructor. This only happens if the setter is added _after_ an instance has been created, e.g. new C().x; // Returns 23 C.prototype.__defineSetter__('x', function(value) { this.y = 23; }); new C().x; // Still returns 23 -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
