summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h
index dfe121f844..158775d398 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.h
@@ -73,7 +73,7 @@ public:
bool has_simple_parameter_list() const { return m_has_simple_parameter_list; }
// Equivalent to absence of [[Construct]]
- virtual bool has_constructor() const override { return !(m_is_arrow_function || m_kind == FunctionKind::Generator); }
+ virtual bool has_constructor() const override { return m_kind == FunctionKind::Regular && !m_is_arrow_function; }
protected:
virtual bool is_strict_mode() const final { return m_strict; }
@@ -87,6 +87,9 @@ private:
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&);
+ void async_block_start(PromiseCapability const&, ExecutionContext&);
+
ThrowCompletionOr<void> function_declaration_instantiation(Interpreter*);
// Internal Slots of ECMAScript Function Objects, https://tc39.es/ecma262/#table-internal-slots-of-ecmascript-function-objects