Bug 129993 - Completed iterator can be revived by adding more than one new entry to the target object
Summary: Completed iterator can be revived by adding more than one new entry to the ta...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: EasyFix, InRadar
Depends on:
Blocks:
 
Reported: 2014-03-09 13:05 PDT by Oliver Hunt
Modified: 2014-08-18 10:08 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.00 KB, patch)
2014-08-17 03:12 PDT, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (7.81 KB, patch)
2014-08-18 00:34 PDT, Diego Pino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2014-03-09 13:05:03 PDT
map = new Map
map.set(1,"foo")
keys = map.keys()
for (key of keys) ;
map.set(2, "bar")
map.set(3, "wibble")
for (key of keys) alert(key) // incorrectly shows 3

iterator spec says that a dead iterator has to remain dead.
Comment 1 Diego Pino 2014-08-17 03:12:52 PDT
Created attachment 236728 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2014-08-17 03:13:05 PDT
<rdar://problem/18043281>
Comment 3 Oliver Hunt 2014-08-17 21:49:17 PDT
Comment on attachment 236728 [details]
Patch

whoops, cq- needs a testcase
Comment 4 Diego Pino 2014-08-18 00:34:42 PDT
Created attachment 236744 [details]
Patch
Comment 5 Diego Pino 2014-08-18 00:35:43 PDT
Test cases added for Map and Set iterators. PTAL.
Comment 6 WebKit Commit Bot 2014-08-18 10:08:38 PDT
Comment on attachment 236744 [details]
Patch

Clearing flags on attachment: 236744

Committed r172707: <http://trac.webkit.org/changeset/172707>
Comment 7 WebKit Commit Bot 2014-08-18 10:08:41 PDT
All reviewed patches have been landed.  Closing bug.