1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-27 13:42:36 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins
Shannon Booth 5d0fb4bac3 LibJS: Do not inherit TypedArray constructors from TypedArrayConstructor
In: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object

The spec says:
> is a constructor function object that all of the TypedArray
> constructor objects inherit from.

From what I understand from this, it effectively just means is that the
prototype for the constructor should simply be set to
TypedArrayConstructor. We _were_ doing that, but also inheriting from
it in C++.

This meant we were invoking TypedArrayConstructor::initialize for each
of the typed arrays. This is not actually what we want, since it means
that the 'of' and 'from' functions were being defined as native
properties in both the concrete typed array (e.g Uint8Array), and the
abstract TypedArray. Instead, the properties should only be defined and
inherited from the abstract TypedArray class.

Diff Tests:
    +4     -4 

Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-12-27 10:57:16 -05:00
..
AggregateError LibJS: Implement the Error Cause proposal 2021-06-11 21:34:05 +01:00
Array LibJS: Allow assignment expression in spreading property definition 2023-08-29 18:46:01 -04:00
ArrayBuffer LibJS: Partially implement resizable ArrayBuffer objects 2023-12-26 11:16:10 +01:00
AsyncGenerator LibJS: Implement await properly for async functions 2023-08-10 05:12:07 +02:00
Atomics LibJS+LibWeb: Implement resizable ArrayBuffer support for TypedArray 2023-12-26 11:16:10 +01:00
BigInt LibJS: Only coerce value once in BigInt constructor 2022-08-03 20:59:59 +01:00
Boolean LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
DataView LibJS+LibWeb: Implement resizable ArrayBuffer support for DataView 2023-12-26 11:16:10 +01:00
Date LibJS: Add Date.parse formats for the output of Date.prototype.to*String 2023-11-08 09:28:17 +01:00
DisposableStack LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
Error LibJS: Lazily collect stack trace information 2023-11-02 07:37:41 +01:00
FinalizationRegistry LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
Function LibJS: Don't assume a this argument for function.prototype.bind 2022-08-17 23:56:24 +01:00
functions LibJS: Make parseFloat use the new double parser 2022-10-23 15:48:45 +02:00
Infinity Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Intl LibJS: Change Intl.Locale info APIs from property getters to methods 2023-11-13 20:10:58 +01:00
Iterator LibJS: Implement %IteratorHelperPrototype%.return 2023-07-16 23:56:55 +01:00
JSON LibJS: Fix that non-double numbers from JSON were truncated to i32 2022-10-23 15:48:45 +02:00
Map LibJS: Re-implement the Array Grouping proposal as static methods 2023-07-12 00:03:54 +02:00
Math LibJS: Enable commented out tests in Math.asin 2022-11-28 13:10:21 +01:00
NaN Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Number LibJS: Support large number of decimals in Number.prototype.toFixed 2023-10-18 19:39:30 -04:00
Object LibJS: Introduce "dictionary" mode for object shapes 2023-12-16 14:25:58 +01:00
Promise LibJS: Implement the Promise.withResolvers proposal 2023-07-13 00:02:19 +02:00
Proxy LibJS: Guard against stack overflow in ProxyObject set_property() 2023-05-06 06:46:02 -07:00
Reflect LibJS: Implement [[Call]] and [[Construct]] internal slots properly 2021-10-09 14:29:20 +01:00
RegExp LibJS: Unescape incorrectly escaped code units in regex patterns 2023-09-16 15:21:09 +02:00
Set LibJS: Disallow negative set record sizes 2023-07-18 12:31:10 +01:00
ShadowRealm LibJS: Add basic support for module code with top-level await 2023-12-06 12:58:04 +01:00
SharedArrayBuffer LibJS: Add initial implementation for SharedArrayBuffer 2023-07-01 16:55:17 +01:00
String LibJS: Behave like major engines when substituting missing capture group 2023-08-29 10:33:48 +02:00
SuppressedError LibJS: Add SuppressedError{, Prototype, Constructor} 2023-01-23 09:56:50 +00:00
Symbol LibJS: Improve error messages for primitive strict mode property access 2023-11-05 18:44:48 +01:00
Temporal LibJS: Disable Temporal custom time zone test 2023-10-18 16:29:27 -04:00
TypedArray LibJS: Do not inherit TypedArray constructors from TypedArrayConstructor 2023-12-27 10:57:16 -05:00
WeakMap LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
WeakRef LibJS: Implement WeakRef changes from 'Symbol as WeakMap Keys Proposal' 2022-06-23 10:57:52 +03:00
WeakSet LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00