« Bugzilla Issues Index
#3524 — 7.3.21 SpeciesConstructor: Return defaultConstructor instead of throwing when the constructor property is absent?
- bug_id:
3524
- creation_ts:
2015-01-15 04:02:00 -0800
- short_desc:
7.3.21 SpeciesConstructor: Return defaultConstructor instead of throwing when the constructor property is absent?
- delta_ts:
2015-01-15 16:19:02 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 30: December 24, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
Claude Pache
- assigned_to:
Allen Wirfs-Brock
- commentid:
11357
- comment_count:
0
- who:
Claude Pache
- bug_when:
2015-01-15 04:02:36 -0800
7.3.21 SpeciesConstructor
When O.constructor is null or undefined, a TypeError is thrown (step 4). A reasonable alternative, which is more consistent with what 9.4.2.3 ArraySpeciesCreate does (and which is less backward-incompatible), is to return /defaultConstructor/.
- commentid:
11404
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2015-01-15 13:18:29 -0800
fixed in rev31 editor's draft
only checking for undefined, which is basically equivalent to missing property.
Setting 'constructor' to null, seems weird enough to throw in this case.
- commentid:
11429
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2015-01-15 16:19:02 -0800
In Rev31