Skip to content

Commit ab0eb3f

Browse files
committed
use call arena for json in Req/Resp
1 parent 08fedd4 commit ab0eb3f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/browser/fetch/Request.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
220220

221221
const p = std.json.parseFromSliceLeaky(
222222
std.json.Value,
223-
page.arena,
223+
page.call_arena,
224224
self.body,
225225
.{},
226226
) catch |e| {
227-
log.warn(.browser, "invalid json", .{ .err = e, .source = "Request" });
227+
log.info(.browser, "invalid json", .{ .err = e, .source = "Request" });
228228
return error.SyntaxError;
229229
};
230230

src/browser/fetch/Response.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
154154

155155
const p = std.json.parseFromSliceLeaky(
156156
std.json.Value,
157-
page.arena,
157+
page.call_arena,
158158
self.body,
159159
.{},
160160
) catch |e| {
161-
log.warn(.browser, "invalid json", .{ .err = e, .source = "fetch" });
161+
log.info(.browser, "invalid json", .{ .err = e, .source = "Response" });
162162
return error.SyntaxError;
163163
};
164164

0 commit comments

Comments
 (0)