mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57: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:
parent
efe4329f9f
commit
1dd6b7f5b7
76 changed files with 671 additions and 671 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue