defineProperty works even if the object is frozen - by FremyCompany [MSFT]

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

ID 571084 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/26/2010 2:24:26 AM
Access Restriction Public


"The [[DefineOwnProperty]] internal method of a host object must not permit the addition of a new property to a host object if the [[Extensible]] internal property of that host object has been observed by ECMAScript code to be false." (ECMAScript 5, p43)
Sign in to post a comment.
Posted by Microsoft on 11/19/2010 at 9:15 PM
Thank you for your feedback.

This issue was resolved in Internet Explorer 9 Platform Preview Build released on 8/4/2010. Please verify the change and file a new feedback (or reactivate the existing one) if the problem persists.

Best regards,

The Internet Explorer Team
Posted by Microsoft on 7/19/2010 at 1:36 PM
Thank you for your feedback. We were able to reproduce the issue and are investigating this.

Best regards,

The IE Team
Posted by FremyCompany [MSFT] on 6/27/2010 at 9:23 AM
/!\ The complete code to reproducee the problem is included in the reproduction steps. This code should be run in an "eval" statement, to match completely the conditions I used to find the bug.

A more complete test case is :
>> var c = {};
alert(Object.isFrozen(c)); // true
Object.defineProperty(c, "value", {get:function() { return 'fail'; }})
alert(c.value) // "fail"
alert(Object.isFrozen(c)); // false
Posted by FremyCompany [MSFT] on 6/26/2010 at 2:27 AM
Similary related bug : When we perform a defineProperty on a frozen object, it seems the object is 'unfrozen' (at least, Object.isFrozen does return false after that).

This should be fixed.