[Webkit-unassigned] [Bug 188382] New: Array.prototype.sort should throw TypeError if param is a not callable object
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 7 11:50:19 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=188382
Bug ID: 188382
Summary: Array.prototype.sort should throw TypeError if param
is a not callable object
Product: WebKit
Version: Safari 11
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: isol2 at cin.ufpe.br
Hi everyone,
According to ES specification (https://tc39.github.io/ecma262/#sec-array.prototype.sort) Array.sort param should be a comparefn or undefined value, otherwise
should throw a TypeError.
steps to reproduce:
var obj = {};
var arr = [];
arr.sort(obj);
arr.sort(obj, obj);
Actual results:
pass without failures
Expected results:
TypeError: The comparison function must be either a function or undefined
V8, Chakra and Spidermonkey 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/20180807/44c415d0/attachment-0001.html>
More information about the webkit-unassigned
mailing list