LibJS: Convert bind_this_value() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-09 16:55:33 +01:00
commit 617d3cd3d3
Notes: sideshowbarker 2024-07-18 02:52:39 +09:00
4 changed files with 16 additions and 11 deletions

View file

@ -378,9 +378,7 @@ Value SuperCall::execute(Interpreter& interpreter, GlobalObject& global_object)
auto& this_er = verify_cast<FunctionEnvironment>(get_this_environment(interpreter.vm()));
// 8. Perform ? thisER.BindThisValue(result).
this_er.bind_this_value(global_object, result);
if (vm.exception())
return {};
TRY_OR_DISCARD(this_er.bind_this_value(global_object, result));
// 9. Let F be thisER.[[FunctionObject]].
// 10. Assert: F is an ECMAScript function object. (NOTE: This is implied by the strong C++ type.)