1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

LibJS: Convert PropertyKey::from_value() to ThrowCompletionOr

Lots of MUST() - perhaps we'll eventually come up with a better API for
the common case where it can't fail.
This commit is contained in:
Linus Groh 2022-01-04 22:33:30 +01:00
parent 62356cff40
commit 29e96eceeb
7 changed files with 23 additions and 25 deletions

View file

@ -810,7 +810,7 @@ ThrowCompletionOr<Object*> merge_largest_unit_option(GlobalObject& global_object
// 3. For each element nextKey of keys, do
for (auto& key : keys) {
auto next_key = PropertyKey::from_value(global_object, key);
auto next_key = MUST(PropertyKey::from_value(global_object, key));
// a. Let propValue be ? Get(options, nextKey).
auto prop_value = TRY(options.get(next_key));