LibJS: Convert Object::get() to ThrowCompletionOr

To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
This commit is contained in:
Linus Groh 2021-10-02 23:52:27 +01:00
commit b7e5f08e56
Notes: sideshowbarker 2024-07-18 03:07:41 +09:00
61 changed files with 326 additions and 686 deletions

View file

@ -72,7 +72,7 @@ Value Reference::get_value(GlobalObject& global_object) const
auto* base_obj = m_base_value.to_object(global_object);
if (!base_obj)
return {};
return base_obj->get(m_name);
return TRY_OR_DISCARD(base_obj->get(m_name));
}
VERIFY(m_base_type == BaseType::Environment);