Bug 133494

Summary: ArrayIterator should not be exposed in Safari 8
Product: WebKit Reporter: Jordan Harband <ljharb>
Component: JavaScriptCoreAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: mathias, oliver, webkit-bug-importer
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.9   
Attachments:
Description Flags
Patch msaboff: review+

Description Jordan Harband 2014-06-03 17:22:50 PDT
In Safari 8:
- Object.prototype.toString.call(ArrayIterator) === '[object Function']
- typeof ArrayIterator !== 'function'
- ArrayIterator() // throws

However, none of this is relevant, because the ES6 spec requires that ArrayIterator not be exposed.

Per https://twitter.com/ohunt/status/473981524983812096 and https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array-iterator-objects

This breaks the es6-shim, and potentially any code that doesn't expect the ArrayIterator global to be defined - or attempts to use it like a standard JS object.
Comment 1 Oliver Hunt 2014-06-04 13:15:33 PDT
Created attachment 232494 [details]
Patch
Comment 2 Michael Saboff 2014-06-04 13:21:17 PDT
Comment on attachment 232494 [details]
Patch

r=me
Comment 3 Oliver Hunt 2014-06-04 14:55:18 PDT
Committed r169598: <http://trac.webkit.org/changeset/169598>