mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
LibJS: Ensure get_new_target() never returns an empty value
Also add spec comments and remove a redundant exception check while we're here :^)
This commit is contained in:
parent
8d70a50aed
commit
451149df0b
4 changed files with 17 additions and 12 deletions
|
@ -81,6 +81,8 @@ ThrowCompletionOr<Value> FunctionEnvironment::get_this_binding(GlobalObject& glo
|
|||
// 9.1.1.3.1 BindThisValue ( V ), https://tc39.es/ecma262/#sec-bindthisvalue
|
||||
ThrowCompletionOr<Value> FunctionEnvironment::bind_this_value(GlobalObject& global_object, Value this_value)
|
||||
{
|
||||
VERIFY(!this_value.is_empty());
|
||||
|
||||
// 1. Assert: envRec.[[ThisBindingStatus]] is not lexical.
|
||||
VERIFY(m_this_binding_status != ThisBindingStatus::Lexical);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue