mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibJS: Make assertion in BindThisValue mirror the spec exactly :^)
This commit is contained in:
parent
8cfb4c82f0
commit
06787410ad
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/06787410add
|
@ -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…
Reference in a new issue