summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Reference.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-02 23:52:27 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-03 20:14:03 +0100
commitb7e5f08e561696001d9b0ced8f3fe50caf186d2c (patch)
treedebbec2ad0557cc166acc7f5777b023b44db080e /Userland/Libraries/LibJS/Runtime/Reference.cpp
parent9b6c09e2c4ff79714dfecb4a98222bec9cc72b71 (diff)
downloadserenity-b7e5f08e561696001d9b0ced8f3fe50caf186d2c.zip
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Reference.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Reference.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Reference.cpp b/Userland/Libraries/LibJS/Runtime/Reference.cpp
index da6cccab20..fe5526158c 100644
--- a/Userland/Libraries/LibJS/Runtime/Reference.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Reference.cpp
@@ -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);