mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Use implicit ThrowCompletionOr<T> constructor where possible
Luckily this is not very widespread yet as most of it would happen in the various JS functions instead of AOs.
This commit is contained in:
parent
894834b5d5
commit
0881f8160f
12 changed files with 25 additions and 25 deletions
|
@ -33,9 +33,9 @@ BoundFunction* FunctionObject::bind(Value bound_this_value, Vector<Value> argume
|
|||
case Value::Type::Null:
|
||||
if (vm.in_strict_mode())
|
||||
return bound_this_value;
|
||||
return { &global_object() };
|
||||
return &global_object();
|
||||
default:
|
||||
return { TRY(bound_this_value.to_object(global_object())) };
|
||||
return TRY(bound_this_value.to_object(global_object()));
|
||||
}
|
||||
};
|
||||
auto bound_this_object = TRY_OR_DISCARD(get_bound_this_object());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue