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

LibJS: Convert delete_binding() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-09 19:49:08 +01:00
parent f35e268024
commit 01370136ee
8 changed files with 41 additions and 12 deletions

View file

@ -144,7 +144,7 @@ bool Reference::delete_(GlobalObject& global_object)
VERIFY(m_base_type == BaseType::Environment);
// c. Return ? base.DeleteBinding(ref.[[ReferencedName]]).
return m_base_environment->delete_binding(global_object, m_name.as_string());
return TRY_OR_DISCARD(m_base_environment->delete_binding(global_object, m_name.as_string()));
}
String Reference::to_string() const