1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins
Andreas Kling 077406dc36 LibJS: Fix two issues with array (length > INT32_MAX)
1. Allow Value(size_t) and use it for array length properties.

If an array length can't fit in an Int32 value, we shouldn't go out of
or way to force it into one. Instead, for values above INT32_MAX,
we simply store them as Double values.

2. Switch to generic indexed property storage for large arrays.

Previously we would always allocate array storage eagerly when the
length property was set. This meant that "a.length = 0x80000000" would
trivially DOS the engine on 32-bit since we don't have that much VM.

We now switch to generic storage when changing the length moves us over
the 4M entry mark.

Fixes #5986.
2021-03-30 13:52:56 +02:00
..
Array LibJS: Fix two issues with array (length > INT32_MAX) 2021-03-30 13:52:56 +02:00
ArrayBuffer Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
BigInt LibJS: Throw RangeError on BigInt exponentiation with negative exponent 2021-03-16 21:54:51 +01:00
Boolean Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Date LibJS Date: Added "Invalid Date". 2021-03-22 20:58:22 +01:00
Error Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Function LibJS: Change non-ScriptFunction source string to "[native code]" 2021-03-14 19:22:16 +01:00
functions Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Infinity Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
JSON Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Math LibJS: Improve correctness of rounding and bitwise operations 2021-02-05 09:38:45 +01:00
NaN Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Number Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Object Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Proxy Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Reflect Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
RegExp LibJS: Don't assume match for each capture group in RegExp.prototype.exec() 2021-02-08 18:01:23 +01:00
String LibJS: Implement (mostly) String.prototype.match 2021-03-14 11:04:50 +01:00
Symbol Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
TypedArray LibJS: Implement 'Relative Indexing Method' proposal (.at()) 2021-03-12 19:01:08 +01:00