mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
AK+Everywhere: Convert JSON value serialization to String
This removes the use of StringBuilder::OutputType (which was ByteString, and only used by the JSON classes). And it removes the StringBuilder template parameter from the serialization methods; this was only ever used with StringBuilder, so a template is pretty overkill here.
This commit is contained in:
parent
2c03de60da
commit
fe2dff4944
Notes:
github-actions[bot]
2025-02-21 00:28:53 +00:00
Author: https://github.com/trflynn89
Commit: fe2dff4944
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3631
Reviewed-by: https://github.com/awesomekling ✅
15 changed files with 98 additions and 95 deletions
|
@ -532,7 +532,7 @@ static bool g_in_assert = false;
|
|||
assert_fail_result.set("assert_fail"sv, true);
|
||||
assert_fail_result.set("result"sv, "assert_fail"sv);
|
||||
assert_fail_result.set("output"sv, StringView { assert_failed_message, strlen(assert_failed_message) });
|
||||
outln(saved_stdout_fd, "RESULT {}{}", assert_fail_result.serialized<StringBuilder>(), '\0');
|
||||
outln(saved_stdout_fd, "RESULT {}{}", assert_fail_result.serialized(), '\0');
|
||||
// (Attempt to) Ensure that messages are written before quitting.
|
||||
fflush(saved_stdout_fd);
|
||||
fflush(stderr);
|
||||
|
@ -733,7 +733,7 @@ int main(int argc, char** argv)
|
|||
result_object.set("test"sv, path);
|
||||
|
||||
ScopeGuard output_guard = [&] {
|
||||
outln(saved_stdout_fd, "RESULT {}{}", result_object.serialized<StringBuilder>(), '\0');
|
||||
outln(saved_stdout_fd, "RESULT {}{}", result_object.serialized(), '\0');
|
||||
fflush(saved_stdout_fd);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue