<div dir="ltr">The fact that [[writable]] can change for a non-configurable property is definitely intentional, see the state diagram MarkM once put up at <<a href="http://wiki.ecmascript.org/doku.php?id=es3.1:attribute_states&s=diagram">http://wiki.ecmascript.org/doku.php?id=es3.1:attribute_states&s=diagram</a>>.<div>
<br></div><div style>Cheers,</div><div style>Tom</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/10 Axel Rauschmayer <span dir="ltr"><<a href="mailto:axel@rauschma.de" target="_blank">axel@rauschma.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">The ECMAScript 5.1 spec says (8.6.1):<div><div>[[Configurable]]: If false, attempts to delete the property, change the property to be an accessor property, or change its attributes (other than [[Value]]) will fail.</div>
</div><div><br></div><div>On the other hand [[DefineOwnProperty]] (8.12.9) allows one to change writability from true to false, even if a property is not configurable:</div><div><br></div><div><div>10 Else, if IsDataDescriptor(current) and IsDataDescriptor(Desc) are both true, then<br>
<div><span style="white-space:pre-wrap">  </span>a. If the [[Configurable]] field of current is false, then<br><div><span style="white-space:pre-wrap">         </span>i. Reject, if the [[Writable]] field of current is false and the [[Writable]] field of Desc is true.<br>
</div><div><span style="white-space:pre-wrap">              </span>ii. If the [[Writable]] field of current is false, then<br><div><span style="white-space:pre-wrap">                    </span>1. Reject, if the [[Value]] field of Desc is present and SameValue(Desc.[[Value]], current.[[Value]]) is false.<br>
</div></div></div><div><span style="white-space:pre-wrap">      </span>b. else, the [[Configurable]] field of current is true, so any change is acceptable.<br></div></div><div><br></div></div><div>(10.a) seems to ignore the case of [[Writable]] of `current` being true. Is this deliberate?</div>
<div><br></div><div>Should the description of [[Configurable]] be changed to better reflect the status quo?</div><span class="HOEnZb"><font color="#888888"><br><div>
<span style="border-collapse:separate;border-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-size:medium"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">-- </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
Dr. Axel Rauschmayer</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><a href="mailto:axel@rauschma.de" target="_blank">axel@rauschma.de</a></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">home: <a href="http://rauschma.de" target="_blank">rauschma.de</a></div>
twitter: <a href="http://twitter.com/rauschma" target="_blank">twitter.com/rauschma</a></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">blog: <a href="http://2ality.com" target="_blank">2ality.com</a></div>
</span></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></font></span></div><br>_______________________________________________<br>
es-discuss mailing list<br>
<a href="mailto:es-discuss@mozilla.org">es-discuss@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/es-discuss" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a><br>
<br></blockquote></div><br></div>