« Bugzilla Issues Index
#2829 — 9.4.5.2 [[DefineOwnProperty]]: Throw if object is not initialized?
- bug_id:
2829
- creation_ts:
2014-05-08 04:40:00 -0700
- short_desc:
9.4.5.2 [[DefineOwnProperty]]: Throw if object is not initialized?
- delta_ts:
2014-06-16 16:32:33 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 24: April 27, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
8218
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-05-08 04:40:35 -0700
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
---
- commentid:
8553
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-05-19 09:37:42 -0700
fixed in rev25 editor's draft
- commentid:
9031
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-06-16 16:32:33 -0700
fixed in rev25 editor's draft