[Webkit-unassigned] [Bug 135879] iOS 8 beta 5 Set forEach sometimes triggers wrong number of times

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 14 09:28:04 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135879





--- Comment #3 from Oliver Hunt <oliver at apple.com>  2014-08-14 09:28:13 PST ---
(In reply to comment #2)
> What happens if you replace forEach with an equivalent:
> 
> Map.prototype.forEach = function forEach(fn /* , thisArg */) {
>     for (var {key, value} of this)
>         fn.call(arguments[1], key, value /*, this -- whoops should jsc be passing this? eep */)
> }
> 
> (e.g. do we screw up general case iteration, or is this something specific to foreach's internal implementation? - also if it does work that would provide something of a workaround.  I'm also wondering if you're mutating the map while iterating?)

Or the equivalent for set:
Set.prototype.forEach = function forEach(fn /* , thisArg */) {
    for (var value of this)
        fn.call(arguments[1], value /*, this -- whoops should jsc be passing this? eep */)
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list