diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/Op.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/Op.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index 9835c15bf8..566b7ef1aa 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -243,10 +243,12 @@ ThrowCompletionOr<void> NewObject::execute_impl(Bytecode::Interpreter& interpret ThrowCompletionOr<void> NewRegExp::execute_impl(Bytecode::Interpreter& interpreter) const { + auto& vm = interpreter.vm(); + auto source = interpreter.current_executable().get_string(m_source_index); auto flags = interpreter.current_executable().get_string(m_flags_index); - interpreter.accumulator() = TRY(regexp_create(interpreter.global_object(), js_string(interpreter.vm(), source), js_string(interpreter.vm(), flags))); + interpreter.accumulator() = TRY(regexp_create(vm, js_string(vm, source), js_string(vm, flags))); return {}; } |