archives

« Bugzilla Issues Index

#2829 — 9.4.5.2 [[DefineOwnProperty]]: Throw if object is not initialized?


9.4.5.2 [[DefineOwnProperty]]:

All property operations but [[DefineOwnProperty]] throw a TypeError if the object is not initialized and the property key is an integer index. It may make sense to throw a TypeError in [[DefineOwnProperty]], too.


Test case:
---
let ta = Int8Array[Symbol.create]();

Reflect.defineProperty(ta, 0, {value: 0}); // returns false

Reflect.get(ta, 0); // throws
Reflect.set(ta, 0, 1); // throws
Reflect.deleteProperty(ta, 0); // throws
Reflect.getOwnPropertyDescriptor(ta, 0); // throws
Reflect.ownKeys(ta); // throws
Reflect.enumerate(ta); // throws
---


fixed in rev25 editor's draft


fixed in rev25 editor's draft