Bug 185208
| Summary: | JSCore does not support "null" as a [Symbol.iterator] property of a typedArray | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mariana Moura <mam7> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ashvayka, fpizlo, isol2, keith_miller, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 11 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Mariana Moura
Hi there,
there is an inconsistency when iterator value of a typedArray is "null".
Tag: 606.1.9.4
OS: Ubuntu 16.04 x86_64
According to GetMethod (object, @@iterator) ES6 specification (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-typedarray-object), if the iterator value is either "undefined" or "null", the method should return "undefined", but JSCore does not support this property as "null".
Steps to reproduce:
let typedArray = new Int8Array(
{
[Symbol.iterator]: null
}
)
Actual results:
Exception: TypeError: Type error
Expected results:
Pass without failures
Other JavaScript engines such as V8, SpiderMonkey and Chakra works as expected.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
isol2
cinfuzz
Radar WebKit Bug Importer
<rdar://problem/48270655>
Alexey Shvayka
(In reply to Mariana Moura from comment #0)
> According to GetMethod (object, @@iterator) ES6 specification
> (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-typedarray-
> object), if the iterator value is either "undefined" or "null", the method
> should return "undefined", but JSCore does not support this property as
> "null".
r262567 fixed GetMethod with iterators, including %TypedArray% constructor case.
test262 coverage: https://github.com/tc39/test262/pull/2639.
*** This bug has been marked as a duplicate of bug 212771 ***