mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
This commit is contained in:
committed by
Andreas Kling
parent
6e19ab2bbc
commit
57dc179b1f
Notes:
sideshowbarker
2024-07-17 03:43:09 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/57dc179b1f Pull-request: https://github.com/SerenityOS/serenity/pull/16311 Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/MacDue
@@ -95,7 +95,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
|
||||
if (value.is_number())
|
||||
return JsonValue { value.as_double() };
|
||||
if (value.is_string())
|
||||
return JsonValue { value.as_string().string() };
|
||||
return JsonValue { value.as_string().deprecated_string() };
|
||||
|
||||
// NOTE: BigInt and Symbol not mentioned anywhere in the WebDriver spec, as it references ES5.
|
||||
// It assumes that all primitives are handled above, and the value is an object for the remaining steps.
|
||||
@@ -114,7 +114,7 @@ static ErrorOr<JsonValue, ExecuteScriptResultType> internal_json_clone_algorithm
|
||||
auto to_json_result = TRY_OR_JS_ERROR(to_json.as_function().internal_call(value, JS::MarkedVector<JS::Value> { vm.heap() }));
|
||||
if (!to_json_result.is_string())
|
||||
return ExecuteScriptResultType::JavaScriptError;
|
||||
return to_json_result.as_string().string();
|
||||
return to_json_result.as_string().deprecated_string();
|
||||
}
|
||||
|
||||
// -> Otherwise
|
||||
|
||||
Reference in New Issue
Block a user