mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:38:10 +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
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