1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibJS: Make Function::call() not require an Interpreter&

This makes a difference inside ScriptFunction::call(), which will now
instantiate a temporary Interpreter if one is not attached to the VM.
This commit is contained in:
Andreas Kling 2020-09-27 17:24:14 +02:00
parent be31805e8b
commit 1ff9d33131
42 changed files with 167 additions and 142 deletions

View file

@ -56,9 +56,9 @@ XMLHttpRequestConstructor::~XMLHttpRequestConstructor()
{
}
JS::Value XMLHttpRequestConstructor::call(JS::Interpreter& interpreter)
JS::Value XMLHttpRequestConstructor::call()
{
return construct(interpreter, *this);
return construct(interpreter(), *this);
}
JS::Value XMLHttpRequestConstructor::construct(JS::Interpreter& interpreter, Function&)

View file

@ -36,7 +36,7 @@ public:
virtual void initialize(JS::GlobalObject&) override;
virtual ~XMLHttpRequestConstructor() override;
virtual JS::Value call(JS::Interpreter&) override;
virtual JS::Value call() override;
virtual JS::Value construct(JS::Interpreter& interpreter, Function& new_target) override;
private: