mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:17:44 +00:00
LibJS: Allow Shape without a global object
It would be nice to be able to cache some shapes globally in the VM, but then they can't be tied to a specific global object. So let's just get rid of the requirement that shapes are tied to a global object.
This commit is contained in:
parent
d66087ac2f
commit
97a05ac9ac
3 changed files with 14 additions and 6 deletions
|
@ -88,7 +88,7 @@ public:
|
|||
Shape& shape() { return *m_shape; }
|
||||
const Shape& shape() const { return *m_shape; }
|
||||
|
||||
GlobalObject& global_object() const { return shape().global_object(); }
|
||||
GlobalObject& global_object() const { return *shape().global_object(); }
|
||||
|
||||
virtual Value get(const PropertyName&, Value receiver = {}) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue