mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibJS: Always keep a reference to the global object in Shape
We need to move towards supporting multiple global objects, which will be a large refactoring. To keep it manageable, let's do it in steps, starting with giving Object a way to find the GlobalObject it lives inside by asking its Shape for it.
This commit is contained in:
parent
10aebabf0b
commit
ff8bb962b6
5 changed files with 26 additions and 15 deletions
|
@ -73,6 +73,8 @@ public:
|
|||
Shape& shape() { return *m_shape; }
|
||||
const Shape& shape() const { return *m_shape; }
|
||||
|
||||
GlobalObject& global_object() const { return shape().global_object(); }
|
||||
|
||||
virtual Value get(PropertyName) const;
|
||||
|
||||
virtual bool has_property(PropertyName) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue