[Webkit-unassigned] [Bug 185625] New: Array#indexOf not finding items in array like objects with .length >= 2 ** 32

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 14 14:25:10 PDT 2018


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

            Bug ID: 185625
           Summary: Array#indexOf not finding items in array like objects
                    with .length >= 2 ** 32
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: leonardo.balter at gmail.com

This predates to ES5.1 where the Array were bound to a max length of 2 ** 32. 

See https://es5.github.io/#x15.4.4.14

Test262:
test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js
test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js

Example:

```
var targetObj = {};
var obj = {
  0: 42,
  length: 2 ** 32 - 1
};

[].indexOf.call(obj, 42); // 0

obj.length = 2 ** 32

[].indexOf.call(obj, 42); // -1
```

-- 
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/20180514/5807e829/attachment-0001.html>


More information about the webkit-unassigned mailing list