archives

« Bugzilla Issues Index

#1684 — 15.14.1.1, 15.15.1.1: Missing ToObject() calls in {Weak}Map constructor


15.14.1.1, step 12h and step 12j both call Get() on the nextItem variable, but nextItem can have any value whereas Get() only operates on objects. Therefore add an additional step after 12f to call ToObject():

f. Let nextItem be IteratorValue(next).
g. Let nextItem be ToObject(nextItem).
h. ReturnIfAbrupt(nextItem).


Also applies to 15.15.1.1 WeakMap constructor


fixed in rev17 editor's draft


fixed in rev17, August 23, 2013 draft