1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibJS: Make AsyncFunctionStart a standalone AO

This function may be called by places outside of
ECMAScriptFunctionObject.
This commit is contained in:
Shannon Booth 2023-07-16 01:22:20 +12:00 committed by Linus Groh
parent 07f451044b
commit 7b5362fea6
2 changed files with 4 additions and 7 deletions

View file

@ -16,6 +16,7 @@
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);
// 10.2 ECMAScript Function Objects, https://tc39.es/ecma262/#sec-ecmascript-function-objects
class ECMAScriptFunctionObject final : public FunctionObject {
@ -104,8 +105,6 @@ private:
ThrowCompletionOr<void> prepare_for_ordinary_call(ExecutionContext& callee_context, Object* new_target);
void ordinary_call_bind_this(ExecutionContext&, Value this_argument);
void async_function_start(PromiseCapability const&);
ThrowCompletionOr<void> function_declaration_instantiation(Interpreter*);
DeprecatedFlyString m_name;