summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-09-15 20:52:21 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-15 23:46:53 +0100
commit568296d0cc9016c8eefa7dd83ace616514ce261a (patch)
tree7f40a79056b3a6cf48960397bd652766b33d455a /Userland/Libraries/LibJS/AST.cpp
parent33679a8445bbfbb0525ff45741e0f379ddca6c29 (diff)
downloadserenity-568296d0cc9016c8eefa7dd83ace616514ce261a.zip
LibJS: Use ThrowCompletionOr in require_object_coercible()
Diffstat (limited to 'Userland/Libraries/LibJS/AST.cpp')
-rw-r--r--Userland/Libraries/LibJS/AST.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index aad0fe71c4..a866f104a1 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -786,9 +786,7 @@ Reference MemberExpression::to_reference(Interpreter& interpreter, GlobalObject&
// From here on equivalent to
// 13.3.4 EvaluatePropertyAccessWithIdentifierKey ( baseValue, identifierName, strict ), https://tc39.es/ecma262/#sec-evaluate-property-access-with-identifier-key
- object_value = require_object_coercible(global_object, object_value);
- if (interpreter.exception())
- return {};
+ object_value = TRY_OR_DISCARD(require_object_coercible(global_object, object_value));
auto property_name = computed_property_name(interpreter, global_object);
if (!property_name.is_valid())