1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibJS: Convert internal_delete() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-29 18:45:33 +01:00
parent e5409c6ead
commit fbfb0bb908
16 changed files with 55 additions and 65 deletions

View file

@ -153,9 +153,7 @@ bool Reference::delete_(GlobalObject& global_object)
VERIFY(base_obj);
// d. Let deleteStatus be ? baseObj.[[Delete]](ref.[[ReferencedName]]).
bool delete_status = base_obj->internal_delete(m_name);
if (vm.exception())
return {};
bool delete_status = TRY_OR_DISCARD(base_obj->internal_delete(m_name));
// e. If deleteStatus is false and ref.[[Strict]] is true, throw a TypeError exception.
if (!delete_status && m_strict) {