Skip to content

Commit

Permalink
LibJS/Bytecode: Don't assert on eval() without arguments
Browse files Browse the repository at this point in the history
3 new passes on test262. :^)
  • Loading branch information
awesomekling committed Jun 25, 2023
1 parent 317f88a commit 7e92fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibJS/Bytecode/Op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ ThrowCompletionOr<void> Call::execute_impl(Bytecode::Interpreter& interpreter) c
Value return_value;
if (m_type == CallType::DirectEval) {
if (callee == interpreter.realm().intrinsics().eval_function())
return_value = TRY(perform_eval(vm, argument_values[0].value_or(JS::js_undefined()), vm.in_strict_mode() ? CallerMode::Strict : CallerMode::NonStrict, EvalMode::Direct));
return_value = TRY(perform_eval(vm, !argument_values.is_empty() ? argument_values[0].value_or(JS::js_undefined()) : js_undefined(), vm.in_strict_mode() ? CallerMode::Strict : CallerMode::NonStrict, EvalMode::Direct));
else
return_value = TRY(call(vm, function, this_value, move(argument_values)));
} else if (m_type == CallType::Call)
Expand Down

0 comments on commit 7e92fda

Please sign in to comment.