Bug 133494 - ArrayIterator should not be exposed in Safari 8
Summary: ArrayIterator should not be exposed in Safari 8
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.9
: P1 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-03 17:22 PDT by Jordan Harband
Modified: 2014-06-04 14:55 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.81 KB, patch)
2014-06-04 13:15 PDT, Oliver Hunt
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>