[webkit-changes] [WebKit/WebKit] 5fd85f: Error message for `new Array(1.5)` is confusing
Ross Kirsling
noreply at github.com
Wed Oct 11 02:17:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5fd85f75915069dee692d60e04cdf9479708e273
https://github.com/WebKit/WebKit/commit/5fd85f75915069dee692d60e04cdf9479708e273
Author: Ross Kirsling <ross.kirsling at sony.com>
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
M JSTests/ChakraCore/test/es5/exceptions3.baseline-jsc
M JSTests/stress/tail-call-host-call-throw.js
M LayoutTests/js/array-from-expected.txt
M LayoutTests/js/dom/dfg-negative-array-size-expected.txt
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/runtime/ArrayConstructor.cpp
M Source/JavaScriptCore/runtime/ArrayConstructor.h
M Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
Log Message:
-----------
Error message for `new Array(1.5)` is confusing
https://bugs.webkit.org/show_bug.cgi?id=262991
Reviewed by Keith Miller.
Currently, `new Array(1.5)` gives the error "Array size is not a small enough positive integer",
which is quite confusing since being "small enough" isn't the problem with 1.5 as an input.
Let's update this to "Array length must be a positive integer of safe magnitude".
* JSTests/ChakraCore/test/es5/exceptions3.baseline-jsc:
* JSTests/stress/tail-call-host-call-throw.js:
* LayoutTests/js/array-from-expected.txt:
* LayoutTests/js/dom/dfg-negative-array-size-expected.txt:
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
* Source/JavaScriptCore/runtime/ArrayConstructor.cpp:
* Source/JavaScriptCore/runtime/ArrayConstructor.h:
* Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:
Canonical link: https://commits.webkit.org/269193@main
More information about the webkit-changes
mailing list