mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS: Make assertion in BindThisValue mirror the spec exactly :^)
This commit is contained in:
parent
8cfb4c82f0
commit
06787410ad
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ Value FunctionEnvironmentRecord::get_this_binding(GlobalObject& global_object) c
|
|||
// 9.1.1.3.1 BindThisValue ( V ), https://tc39.es/ecma262/#sec-bindthisvalue
|
||||
Value FunctionEnvironmentRecord::bind_this_value(GlobalObject& global_object, Value this_value)
|
||||
{
|
||||
VERIFY(has_this_binding());
|
||||
VERIFY(this_binding_status() != ThisBindingStatus::Lexical);
|
||||
if (this_binding_status() == ThisBindingStatus::Initialized) {
|
||||
vm().throw_exception<ReferenceError>(global_object, ErrorType::ThisIsAlreadyInitialized);
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue