mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibJS: Convert bind_this_value() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
0aa24f4ce5
commit
617d3cd3d3
4 changed files with 16 additions and 11 deletions
|
@ -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.)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue