ladybird/Libraries/LibJS/Tests/builtins
Luke Wilde 6319dedbcd LibJS: Perform TLA async function construction in the module context
Previously it was only pushing the module context for the call to
capture the module execution context. This is incorrect, as the capture
occurs upon function construction. This resulted in it capturing the
execution context that execute_module was called from, instead of the
newly created module_context.
f87041bf3a/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp (L92)

This can be demonstrated with the following setup:
index.html:
```html
<script>
    var foo = 1;
</script>
<script type="module">
    import {test} from "./scriptA.mjs";
</script>
```

scriptA.mjs:
```js
function foo() {
	return {a: "b"};
}
export let test = await foo();
```

Before this fix, this would throw:
```
[TypeError] 1 is not a function (evaluated from 'foo')
    at module code with top-level await
    at module code with top-level await
    at <unknown>
    at <unknown>
```

Fixes #2245.
2024-11-15 18:52:22 +01:00
..
AggregateError
Array
ArrayBuffer
AsyncGenerator
Atomics
BigInt
Boolean
DataView
Date LibJS: Parse dates like "November 19 2024 00:00:00 +0900" 2024-11-12 13:23:34 +01:00
DisposableStack
Error
FinalizationRegistry
Function
functions
Infinity
Intl
Iterator
JSON
Map
Math LibJS: Add support for Float16Array 2024-11-10 14:48:20 -07:00
NaN
Number
Object
Promise
Proxy
Reflect
RegExp
Set
ShadowRealm LibJS: Perform TLA async function construction in the module context 2024-11-15 18:52:22 +01:00
SharedArrayBuffer
String
SuppressedError
Symbol
Temporal
TypedArray LibJS: Add support for Float16Array 2024-11-10 14:48:20 -07:00
WeakMap
WeakRef
WeakSet