mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Convert perform_eval to ThrowCompletionOr
This commit is contained in:
parent
e24d4c346d
commit
1da8faebf5
Notes:
sideshowbarker
2024-07-18 03:34:20 +09:00
Author: https://github.com/IdanHo
Commit: 1da8faebf5
Pull-request: https://github.com/SerenityOS/serenity/pull/10169
Reviewed-by: https://github.com/linusg ✅
4 changed files with 15 additions and 9 deletions
|
@ -243,7 +243,7 @@ Value CallExpression::execute(Interpreter& interpreter, GlobalObject& global_obj
|
|||
&& callee_reference.name().as_string() == vm.names.eval.as_string()) {
|
||||
|
||||
auto script_value = arg_list.size() == 0 ? js_undefined() : arg_list[0];
|
||||
return perform_eval(script_value, global_object, vm.in_strict_mode() ? CallerMode::Strict : CallerMode::NonStrict, EvalMode::Direct);
|
||||
return TRY_OR_DISCARD(perform_eval(script_value, global_object, vm.in_strict_mode() ? CallerMode::Strict : CallerMode::NonStrict, EvalMode::Direct));
|
||||
}
|
||||
|
||||
return vm.call(function, this_value, move(arg_list));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue