mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +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
|
@ -36,8 +36,7 @@ public:
|
|||
auto& bytecode_executable() const { return m_bytecode_executable; }
|
||||
|
||||
virtual Environment* environment() override { return m_environment; }
|
||||
|
||||
GlobalObject* realm() const override { return m_realm; }
|
||||
virtual Realm* realm() const override { return m_realm; }
|
||||
|
||||
protected:
|
||||
virtual bool is_strict_mode() const final { return m_is_strict; }
|
||||
|
@ -54,7 +53,7 @@ private:
|
|||
const Vector<FunctionNode::Parameter> m_parameters;
|
||||
Optional<Bytecode::Executable> m_bytecode_executable;
|
||||
Environment* m_environment { nullptr };
|
||||
GlobalObject* m_realm { nullptr };
|
||||
Realm* m_realm { nullptr };
|
||||
i32 m_function_length { 0 };
|
||||
FunctionKind m_kind { FunctionKind::Regular };
|
||||
bool m_is_strict { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue