archives

« Bugzilla Issues Index

#1157 — 15.14.5.2: Map.prototype.clear interacts badly with Map.prototype.forEach


Map.prototype.clear sets the value of the [[MapData]] internal data property to a new empty list, but Map.prototype.forEach retains a local copy of the [[MapData]]'s value. That means forEach() will visit removed entries when clear() is called in the meantime.


fixed in rev 14 editor's draft

also fixed for Set.prototype.clear


in Rev 14 draft