use call arena for json in Req/Resp

This commit is contained in:
Muki Kiboigo committed 2025-09-17 08:45:20 -07:00
1 parent 618fff0191
commit bb2595eca5
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -220,11 +220,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
const p = std.json.parseFromSliceLeaky(
std.json.Value,
page.arena,
page.call_arena,
self.body,
.{},
) catch |e| {
log.warn(.browser, "invalid json", .{ .err = e, .source = "Request" });
log.info(.browser, "invalid json", .{ .err = e, .source = "Request" });
return error.SyntaxError;
};
+2 -2
View File
@@ -154,11 +154,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
const p = std.json.parseFromSliceLeaky(
std.json.Value,
page.arena,
page.call_arena,
self.body,
.{},
) catch |e| {
log.warn(.browser, "invalid json", .{ .err = e, .source = "fetch" });
log.info(.browser, "invalid json", .{ .err = e, .source = "Response" });
return error.SyntaxError;
};