mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
LibJS: Convert JSONObject functions to ThrowCompletionOr
This commit is contained in:
parent
6b954b9e76
commit
e7a134a346
3 changed files with 66 additions and 102 deletions
|
@ -239,7 +239,7 @@ inline AK::Result<NonnullRefPtr<JS::SourceTextModule>, ParserError> parse_module
|
|||
inline Optional<JsonValue> get_test_results(JS::Interpreter& interpreter)
|
||||
{
|
||||
auto results = MUST(interpreter.global_object().get("__TestResults__"));
|
||||
auto json_string = JS::JSONObject::stringify_impl(interpreter.global_object(), results, JS::js_undefined(), JS::js_undefined());
|
||||
auto json_string = TRY_OR_DISCARD(JS::JSONObject::stringify_impl(interpreter.global_object(), results, JS::js_undefined(), JS::js_undefined()));
|
||||
|
||||
auto json = JsonValue::from_string(json_string);
|
||||
if (!json.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue