archives

« Bugzilla Issues Index

#1216 — Description of [[Writable]] wrong


8.1.6.1 Table 5 says that [[Writable]]

"If false, attempts by ECMAScript code to change the property’s [[Value]] attribute using [[SetP]] or [[DefineOwnProperty]] will not succeed."

The "or [[DefineOwnProperty]]" should be deleted.


Why?? Object.defineProperty(o,p, {value: "foo"})
fales if property p is non-writable and and the current value is not "foo".


(In reply to comment #1)
> Why?? Object.defineProperty(o,p, {value: "foo"})
> [fails] if property p is non-writable and and the current value is not "foo".

Even if o[p] is configurable? I don't think so.


You're correct, I double checked against the ES5.1 spec.

That's actually a little scary because I not sure that the state of [[Writable]] is explicitly considered every place (primarily in ch. 15) where [[DefineOwnProoperty]] is used instead of [[Put]] to set a value.



corrected in rev 14 editor's draft


in Rev 14 draft