summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-09-16 00:57:38 +0300
committerLinus Groh <mail@linusgroh.de>2021-09-16 13:53:37 +0100
commit5a4c90fcb1d4bb3fea5bf564ac13a58813d73663 (patch)
tree5f0b549d2f21f181c61b648defab51a30c5ea0f3 /Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
parentb61eff873050a3eb906879cbdddc068bb2875607 (diff)
downloadserenity-5a4c90fcb1d4bb3fea5bf564ac13a58813d73663.zip
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/MapConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/MapConstructor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
index 0e4a732471..36dc4dbbe0 100644
--- a/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/MapConstructor.cpp
@@ -49,9 +49,7 @@ Value MapConstructor::construct(FunctionObject& new_target)
auto& vm = this->vm();
auto& global_object = this->global_object();
- auto* map = ordinary_create_from_constructor<Map>(global_object, new_target, &GlobalObject::map_prototype);
- if (vm.exception())
- return {};
+ auto* map = TRY_OR_DISCARD(ordinary_create_from_constructor<Map>(global_object, new_target, &GlobalObject::map_prototype));
if (vm.argument(0).is_nullish())
return map;