1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:37:46 +00:00

LibJS: Implement & use the {Ordinary,PrepareFor}WrappedFunctionCall AOs

This is a normative change in the ShadowRealm spec.

See: 5a3aae8
This commit is contained in:
Linus Groh 2022-07-31 12:13:33 +02:00
parent 5a281336c5
commit fed1498824
3 changed files with 102 additions and 13 deletions

View file

@ -27,6 +27,9 @@ public:
virtual Realm* realm() const override { return &m_realm; }
FunctionObject const& wrapped_target_function() const { return m_wrapped_target_function; }
FunctionObject& wrapped_target_function() { return m_wrapped_target_function; }
private:
virtual void visit_edges(Visitor&) override;
@ -35,4 +38,7 @@ private:
Realm& m_realm; // [[Realm]]
};
ThrowCompletionOr<Value> ordinary_wrapped_function_call(WrappedFunction const&, Value this_argument, MarkedVector<Value> const& arguments_list);
void prepare_for_wrapped_function_call(WrappedFunction const&, ExecutionContext& callee_context);
}