[Webkit-unassigned] [Bug 159400] New: %TypedArray%.prototype.indexOf is coercing non-integers or non-floats to numbers wrongly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 4 00:48:31 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=159400
Bug ID: 159400
Summary: %TypedArray%.prototype.indexOf is coercing
non-integers or non-floats to numbers wrongly
Classification: Unclassified
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: ticaiolima at gmail.com
Current implementation of %TypedArray%.prototype.indexOf is coercing the argument to Array type and generating strange results, which are potential bug generators. Check the following example:
>>> new UInt8Array([0, 1, 2]).indexOf("abc");
0
The return value is 0 because "abc" is being converted to 0. It makes more sense of the result is -1.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160704/cb9add4e/attachment.html>
More information about the webkit-unassigned
mailing list