diff options
author | Andreas Kling <kling@serenityos.org> | 2020-09-27 17:24:14 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-27 20:26:58 +0200 |
commit | 1ff9d33131921d97b5de99496f933bcebeb4faaa (patch) | |
tree | 4acdaf985eacab8d64820535272a6d50d7b3a0a7 /Libraries/LibJS/Runtime/SymbolConstructor.cpp | |
parent | be31805e8be783145c3b5909ea99144a7c737e32 (diff) | |
download | serenity-1ff9d33131921d97b5de99496f933bcebeb4faaa.zip |
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.
Diffstat (limited to 'Libraries/LibJS/Runtime/SymbolConstructor.cpp')
-rw-r--r-- | Libraries/LibJS/Runtime/SymbolConstructor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibJS/Runtime/SymbolConstructor.cpp b/Libraries/LibJS/Runtime/SymbolConstructor.cpp index 64de9db9ff..3c40c0f55e 100644 --- a/Libraries/LibJS/Runtime/SymbolConstructor.cpp +++ b/Libraries/LibJS/Runtime/SymbolConstructor.cpp @@ -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&) |