[Webkit-unassigned] [Bug 185197] New: Iterator of Array.keys() returns object in wrong order
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 2 07:02:57 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185197
Bug ID: 185197
Summary: Iterator of Array.keys() returns object in wrong order
Product: WebKit
Version: Safari 11
Hardware: Unspecified
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: afa3 at cin.ufpe.br
Hi everyone,
according to ES6 specification (https://www.ecma-international.org/ecma-262/8.0/index.html#sec-createiterresultobject), the Iterator
of a TypedArray.keys() or an Array.keys() should return an object on this order {value: Integer, done: Boolean}.
Step to reproduce:
var arr = new Int8Array([1,2,3]);
var iterator = arr.keys();
var a = iterator.next();
var toString = JSON.stringify(a); // just to check if it is the same string
if (!(toString === JSON.stringify({value: 0, done: false})))
throw new Error('expected {"value": 0, "done": false}, got ' + toString)
Actual results:
Error: expected {"value": 0, "done": false}, got {"done": false, "value": 0}
Expected results:
Pass without failures
Other JavaScript engines such as V8, SpiderMonkey and Chakra works as expected.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180502/377bdc73/attachment-0001.html>
More information about the webkit-unassigned
mailing list