mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +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
Notes:
sideshowbarker
2024-07-19 05:45:11 +09:00
Author: https://github.com/awesomekling
Commit: ff8bb962b6
5 changed files with 26 additions and 15 deletions
|
@ -91,7 +91,7 @@ Object::Object(Object* prototype)
|
|||
m_shape = interpreter().global_object().empty_object_shape();
|
||||
set_prototype(prototype);
|
||||
} else {
|
||||
m_shape = interpreter().heap().allocate<Shape>();
|
||||
m_shape = interpreter().heap().allocate<Shape>(interpreter().global_object());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue