diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-09-16 00:57:38 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-16 13:53:37 +0100 |
commit | 5a4c90fcb1d4bb3fea5bf564ac13a58813d73663 (patch) | |
tree | 5f0b549d2f21f181c61b648defab51a30c5ea0f3 /Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp | |
parent | b61eff873050a3eb906879cbdddc068bb2875607 (diff) | |
download | serenity-5a4c90fcb1d4bb3fea5bf564ac13a58813d73663.zip |
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp index cc389b5834..96fc7b3bca 100644 --- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp @@ -74,7 +74,7 @@ Value ObjectConstructor::construct(FunctionObject& new_target) auto& global_object = this->global_object(); if (&new_target != this) - return ordinary_create_from_constructor<Object>(global_object, new_target, &GlobalObject::object_prototype); + return TRY_OR_DISCARD(ordinary_create_from_constructor<Object>(global_object, new_target, &GlobalObject::object_prototype)); auto value = vm.argument(0); if (value.is_nullish()) return Object::create(global_object, global_object.object_prototype()); |