mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +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:
parent
62356cff40
commit
29e96eceeb
Notes:
sideshowbarker
2024-07-17 21:38:37 +09:00
Author: https://github.com/linusg
Commit: 29e96eceeb
Pull-request: https://github.com/SerenityOS/serenity/pull/11626
Reviewed-by: https://github.com/IdanHo ✅
7 changed files with 23 additions and 25 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue