mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Set the callee context's realm in prepare_for_ordinary_call()
This includes making FunctionObject::realm() actually return a Realm, instead of a GlobalObject.
This commit is contained in:
parent
332946ab4f
commit
06e89311fa
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/linusg
Commit: 06e89311fa
Pull-request: https://github.com/SerenityOS/serenity/pull/9980
Reviewed-by: https://github.com/awesomekling ✅
8 changed files with 31 additions and 11 deletions
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
virtual bool is_strict_mode() const override;
|
||||
|
||||
GlobalObject* realm() const override { return &global_object(); }
|
||||
virtual Realm* realm() const override { return m_realm; }
|
||||
|
||||
protected:
|
||||
NativeFunction(FlyString name, Object& prototype);
|
||||
|
@ -41,6 +41,7 @@ private:
|
|||
|
||||
FlyString m_name;
|
||||
Function<Value(VM&, GlobalObject&)> m_native_function;
|
||||
Realm* m_realm { nullptr };
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue