mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 23:59:53 +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:
parent
be31805e8b
commit
1ff9d33131
Notes:
sideshowbarker
2024-07-19 02:10:38 +09:00
Author: https://github.com/awesomekling
Commit: 1ff9d33131
42 changed files with 167 additions and 142 deletions
|
@ -47,9 +47,9 @@ ErrorConstructor::~ErrorConstructor()
|
|||
{
|
||||
}
|
||||
|
||||
Value ErrorConstructor::call(Interpreter& interpreter)
|
||||
Value ErrorConstructor::call()
|
||||
{
|
||||
return construct(interpreter, *this);
|
||||
return construct(interpreter(), *this);
|
||||
}
|
||||
|
||||
Value ErrorConstructor::construct(Interpreter& interpreter, Function&)
|
||||
|
@ -75,9 +75,9 @@ Value ErrorConstructor::construct(Interpreter& interpreter, Function&)
|
|||
define_property("length", Value(1), Attribute::Configurable); \
|
||||
} \
|
||||
ConstructorName::~ConstructorName() { } \
|
||||
Value ConstructorName::call(Interpreter& interpreter) \
|
||||
Value ConstructorName::call() \
|
||||
{ \
|
||||
return construct(interpreter, *this); \
|
||||
return construct(interpreter(), *this); \
|
||||
} \
|
||||
Value ConstructorName::construct(Interpreter& interpreter, Function&) \
|
||||
{ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue