mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +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
42 changed files with 167 additions and 142 deletions
|
@ -56,11 +56,11 @@ SymbolConstructor::~SymbolConstructor()
|
|||
{
|
||||
}
|
||||
|
||||
Value SymbolConstructor::call(Interpreter& interpreter)
|
||||
Value SymbolConstructor::call()
|
||||
{
|
||||
if (!interpreter.argument_count())
|
||||
return js_symbol(interpreter, "", false);
|
||||
return js_symbol(interpreter, interpreter.argument(0).to_string(interpreter), false);
|
||||
if (!vm().argument_count())
|
||||
return js_symbol(heap(), "", false);
|
||||
return js_symbol(heap(), vm().argument(0).to_string(interpreter()), false);
|
||||
}
|
||||
|
||||
Value SymbolConstructor::construct(Interpreter& interpreter, Function&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue