1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:15:07 +00:00

LibWeb: Split JS wrapper constructors into construct/initialize

This commit is contained in:
Andreas Kling 2020-06-20 17:28:13 +02:00
parent 06e29fac57
commit 03da70c7d0
31 changed files with 107 additions and 55 deletions

View file

@ -64,7 +64,7 @@ JS::Value XMLHttpRequestConstructor::call(JS::Interpreter& interpreter)
JS::Value XMLHttpRequestConstructor::construct(JS::Interpreter& interpreter)
{
auto& window = static_cast<WindowObject&>(global_object());
return interpreter.heap().allocate<XMLHttpRequestWrapper>(window, XMLHttpRequest::create(window.impl()));
return interpreter.heap().allocate<XMLHttpRequestWrapper>(window, window, XMLHttpRequest::create(window.impl()));
}
}