mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibJS: Make AsyncFunctionStart and AsyncBlockStart templates
This will allow implementing a version of these functions that accepts a JS::SafeFunction, which is needed for the implementation of Array.fromAsync.
This commit is contained in:
parent
7b5362fea6
commit
930dd2948f
3 changed files with 13 additions and 5 deletions
|
@ -15,8 +15,11 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
void async_block_start(VM&, NonnullRefPtr<Statement const> const& parse_node, PromiseCapability const&, ExecutionContext&);
|
||||
void async_function_start(VM&, PromiseCapability const&, NonnullRefPtr<Statement const> const& async_function_body);
|
||||
template<typename T>
|
||||
void async_block_start(VM&, T const& async_body, PromiseCapability const&, ExecutionContext&);
|
||||
|
||||
template<typename T>
|
||||
void async_function_start(VM&, PromiseCapability const&, T const& async_function_body);
|
||||
|
||||
// 10.2 ECMAScript Function Objects, https://tc39.es/ecma262/#sec-ecmascript-function-objects
|
||||
class ECMAScriptFunctionObject final : public FunctionObject {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue