[Webkit-unassigned] [Bug 216817] New: A question about TypedArray.prototype.lastIndexOf

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 22 01:32:40 PDT 2020


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

            Bug ID: 216817
           Summary: A question about TypedArray.prototype.lastIndexOf
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nisl_grammarly1 at 163.com

According to ES10.0, "%TypedArray%.prototype.lastIndexOf" is a distinct function that implements the same algorithm as "Array.prototype.lastIndexOf". And it's optimization must not introduce any observable changes in the specified behaviour of the algorithm. But these two methods acts differently when no argument is passed. Is this an issue about javascriptCore?

#### version
dbae081


#### command
webkit/WebKitBuild/Debug/bin/jsc testcase.js


#### testcase
var v1 = [];
print(v1.lastIndexOf());

var v2 = new Uint8Array();
print(v2.lastIndexOf());


#### output
-1
TypeError: Expected at least one argument



#### expected output
-1
-1


contributor:Yuan Wang

-- 
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/20200922/eaa5ffa8/attachment.htm>


More information about the webkit-unassigned mailing list