1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()

This is a preparatory step to making `get()` return `ErrorOr`.
This commit is contained in:
Sam Atkins 2022-12-21 11:42:06 +00:00 committed by Tim Flynn
parent efe4329f9f
commit 1dd6b7f5b7
76 changed files with 671 additions and 671 deletions

View file

@ -267,20 +267,20 @@ static JsonValue match_capabilities(JsonObject const& capabilities)
// -> "browserName"
if (name == "browserName"sv) {
// If value is not a string equal to the "browserName" entry in matched capabilities, return success with data null.
if (value.as_string() != matched_capabilities.get(name).as_string())
if (value.as_string() != matched_capabilities.get_deprecated(name).as_string())
return AK::Error::from_string_view("browserName"sv);
}
// -> "browserVersion"
else if (name == "browserVersion"sv) {
// Compare value to the "browserVersion" entry in matched capabilities using an implementation-defined comparison algorithm. The comparison is to accept a value that places constraints on the version using the "<", "<=", ">", and ">=" operators.
// If the two values do not match, return success with data null.
if (!matches_browser_version(value.as_string(), matched_capabilities.get(name).as_string()))
if (!matches_browser_version(value.as_string(), matched_capabilities.get_deprecated(name).as_string()))
return AK::Error::from_string_view("browserVersion"sv);
}
// -> "platformName"
else if (name == "platformName"sv) {
// If value is not a string equal to the "platformName" entry in matched capabilities, return success with data null.
if (!matches_platform_name(value.as_string(), matched_capabilities.get(name).as_string()))
if (!matches_platform_name(value.as_string(), matched_capabilities.get_deprecated(name).as_string()))
return AK::Error::from_string_view("platformName"sv);
}
// -> "acceptInsecureCerts"