« Bugzilla Issues Index
#2990 — Remove NormalCompletion from WeakMap and WeakSet constructors?
- bug_id:
2990
- creation_ts:
2014-06-18 12:16:00 -0700
- short_desc:
Remove NormalCompletion from WeakMap and WeakSet constructors?
- delta_ts:
2015-07-10 08:34:21 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 25: May 22, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Erik Arvidsson
- assigned_to:
Allen Wirfs-Brock
- cc:
erik.arvidsson
- commentid:
9043
- comment_count:
0
- who:
Erik Arvidsson
- bug_when:
2014-06-18 12:16:58 -0700
For WeakSet ( [ iterable ] ) we have:
"If next is false, then return NormalCompletion(set)."
But for Set ( [ iterable ] ) we have:
"If iter is undefined, then return set."
Other than that the two constructors are equal (minus WeakSetData vs SetData)
Same goes for WeakMap.
Another option is to refactor the spec so that WeakSet and Set can share the spec for their constructors.
- commentid:
9121
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-07-02 10:39:05 -0700
fixed in rev26 editor's draft
eliminated the unnecessary NormalCompletion's
It would be nice to refactor to share a common algorithm, the the differing internal slot names makes it difficult. I'm going to leave it as is in that regard, for now.
- commentid:
9399
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-07-19 18:49:07 -0700
fixed in rev26