archives

« Bugzilla Issues Index

#4331 — 9.1.9 [[Set]]: super.prop assignment can silently overwrite non-writable properties


see https://esdiscuss.org/topic/super-prop-assignment-can-silently-overwrite-non-writable-properties

If Receiver is different from the object [[Set]] is invoked upon and the property to set already exits as an own property of Receiver, the current algorithm can over-write a non-writable property or turn an accesor property into a data property.

It should fail (return false) in the situation where it currently does either of these.


fixed in rev29 publication draft.

Step 5.e has been updated to read:

5.e. If existingDescriptor is not undefined, then
i. If IsAccessorDescriptor(existingDescriptor) is true, return false.
ii. If existingDescriptor.[[Writable]] is false, return false.
iii. Let valueDesc be the PropertyDescriptor{[[Value]]: V}.
iv. Return Receiver.[[DefineOwnProperty]](P, valueDesc).

the above steps 5.e.i and 5.e.11 are new


(In reply to Allen Wirfs-Brock from comment #1)
> fixed in rev29 publication draft.
>

Make that:

fixed in rev39 publication draft.