LibJS: Take SharedFunctionInstanceData in NativeJavaScriptBackedFunction

Change NativeJavaScriptBackedFunction::create() to accept an
already-created GC::Ref<SharedFunctionInstanceData> instead of a
FunctionNode const&, removing another point of AST-runtime coupling.
This commit is contained in:
Andreas Kling
2026-02-11 12:05:57 +01:00
committed by Andreas Kling
parent 7e85bb251f
commit ef992b2010
Notes: github-actions[bot] 2026-02-11 22:58:51 +00:00
2 changed files with 2 additions and 14 deletions

View File

@@ -16,7 +16,7 @@ class NativeJavaScriptBackedFunction final : public NativeFunction {
GC_DECLARE_ALLOCATOR(NativeJavaScriptBackedFunction);
public:
static GC::Ref<NativeJavaScriptBackedFunction> create(Realm&, FunctionNode const& function_node, PropertyKey const& name, i32 length);
static GC::Ref<NativeJavaScriptBackedFunction> create(Realm&, GC::Ref<SharedFunctionInstanceData>, PropertyKey const& name, i32 length);
virtual ~NativeJavaScriptBackedFunction() override = default;