LibJS: Make stored realm in NativeFunction non-null

We now always have a realm for NativeFunction, which allows removing an
old hack in internal_call and internal_construct.
This commit is contained in:
Luke Wilde 2025-11-06 18:34:50 +00:00 committed by Andreas Kling
parent 354888640d
commit 899c6ebffc
Notes: github-actions[bot] 2025-11-30 10:56:19 +00:00
2 changed files with 7 additions and 27 deletions

View file

@ -67,7 +67,7 @@ private:
Optional<Utf16FlyString> m_initial_name; // [[InitialName]]
Optional<Bytecode::Builtin> m_builtin;
AK::Function<ThrowCompletionOr<Value>(VM&)> m_native_function;
GC::Ptr<Realm> m_realm;
GC::Ref<Realm> m_realm;
};
template<>