mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibJS: Convert the GetValue AO to ThrowCompletionOr
This commit is contained in:
parent
d73b258874
commit
390a04a985
Notes:
sideshowbarker
2024-07-18 01:33:41 +09:00
Author: https://github.com/IdanHo
Commit: 390a04a985
Pull-request: https://github.com/SerenityOS/serenity/pull/10765
Reviewed-by: https://github.com/linusg ✅
6 changed files with 33 additions and 49 deletions
|
@ -1331,9 +1331,7 @@ int main(int argc, char** argv)
|
|||
auto maybe_variable = vm->resolve_binding(variable_name, &global_environment);
|
||||
if (vm->exception())
|
||||
break;
|
||||
maybe_value = maybe_variable.get_value(interpreter->global_object());
|
||||
if (vm->exception())
|
||||
break;
|
||||
maybe_value = TRY_OR_DISCARD(maybe_variable.get_value(interpreter->global_object()));
|
||||
VERIFY(!maybe_value->is_empty());
|
||||
|
||||
auto variable = *maybe_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue