mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
Services/WebContent: Use JsonArray::append
We can use the failable function here easily
This commit is contained in:
parent
ada6dbf636
commit
bedb370dec
1 changed files with 2 additions and 2 deletions
|
@ -1521,7 +1521,7 @@ Messages::WebDriverClient::GetAllCookiesResponse WebDriverConnection::get_all_co
|
||||||
auto serialized_cookie = serialize_cookie(cookie);
|
auto serialized_cookie = serialize_cookie(cookie);
|
||||||
|
|
||||||
// 2. Append serialized cookie to cookies
|
// 2. Append serialized cookie to cookies
|
||||||
cookies.must_append(move(serialized_cookie));
|
TRY(cookies.append(move(serialized_cookie)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. Return success with data cookies.
|
// 5. Return success with data cookies.
|
||||||
|
@ -1997,7 +1997,7 @@ ErrorOr<JsonArray, Web::WebDriver::Error> WebDriverConnection::find(StartNodeGet
|
||||||
|
|
||||||
// 8. For each element in elements returned, append the web element reference object for element, to result.
|
// 8. For each element in elements returned, append the web element reference object for element, to result.
|
||||||
for (size_t i = 0; i < elements->length(); ++i)
|
for (size_t i = 0; i < elements->length(); ++i)
|
||||||
result.must_append(web_element_reference_object(*elements->item(i)));
|
TRY(result.append(web_element_reference_object(*elements->item(i))));
|
||||||
|
|
||||||
// 9. Return success with data result.
|
// 9. Return success with data result.
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue