mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibJS: Add Interpreter::create<GlobalObjectType>()
Force Interpreter construction to go via a create() helper that takes the global object type as a template parameter.
This commit is contained in:
parent
aee4c1f583
commit
9d5d0261e1
Notes:
sideshowbarker
2024-07-19 08:00:41 +09:00
Author: https://github.com/awesomekling
Commit: 9d5d0261e1
3 changed files with 16 additions and 17 deletions
|
@ -360,10 +360,8 @@ Color Document::visited_link_color() const
|
|||
|
||||
JS::Interpreter& Document::interpreter()
|
||||
{
|
||||
if (!m_interpreter) {
|
||||
m_interpreter = make<JS::Interpreter>();
|
||||
m_interpreter->initialize_global_object<Bindings::WindowObject>(*m_window);
|
||||
}
|
||||
if (!m_interpreter)
|
||||
m_interpreter = JS::Interpreter::create<Bindings::WindowObject>(*m_window);
|
||||
return *m_interpreter;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue