mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibJS: Allow converting a reference to an object to fail in delete
This is (part of) a normative change in the ECMA-262 spec. See:d09532c
We recently implemented other parts of that commit in LibJS, but missed this change:442ca4f9b4
2b19d1b5ab
This commit is contained in:
parent
888af08638
commit
a2e245fa97
1 changed files with 2 additions and 2 deletions
|
@ -170,8 +170,8 @@ ThrowCompletionOr<bool> Reference::delete_(VM& vm)
|
|||
if (is_super_reference())
|
||||
return vm.throw_completion<ReferenceError>(ErrorType::UnsupportedDeleteSuperProperty);
|
||||
|
||||
// c. Let baseObj be ! ToObject(ref.[[Base]]).
|
||||
auto base_obj = MUST(m_base_value.to_object(vm));
|
||||
// c. Let baseObj be ? ToObject(ref.[[Base]]).
|
||||
auto base_obj = TRY(m_base_value.to_object(vm));
|
||||
|
||||
// d. Let deleteStatus be ? baseObj.[[Delete]](ref.[[ReferencedName]]).
|
||||
bool delete_status = TRY(base_obj->internal_delete(m_name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue