mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
use call arena for json in Req/Resp
This commit is contained in:
@@ -220,11 +220,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
|
|||||||
|
|
||||||
const p = std.json.parseFromSliceLeaky(
|
const p = std.json.parseFromSliceLeaky(
|
||||||
std.json.Value,
|
std.json.Value,
|
||||||
page.arena,
|
page.call_arena,
|
||||||
self.body,
|
self.body,
|
||||||
.{},
|
.{},
|
||||||
) catch |e| {
|
) catch |e| {
|
||||||
log.warn(.browser, "invalid json", .{ .err = e, .source = "Request" });
|
log.info(.browser, "invalid json", .{ .err = e, .source = "Request" });
|
||||||
return error.SyntaxError;
|
return error.SyntaxError;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -154,11 +154,11 @@ pub fn _json(self: *Response, page: *Page) !Env.Promise {
|
|||||||
|
|
||||||
const p = std.json.parseFromSliceLeaky(
|
const p = std.json.parseFromSliceLeaky(
|
||||||
std.json.Value,
|
std.json.Value,
|
||||||
page.arena,
|
page.call_arena,
|
||||||
self.body,
|
self.body,
|
||||||
.{},
|
.{},
|
||||||
) catch |e| {
|
) catch |e| {
|
||||||
log.warn(.browser, "invalid json", .{ .err = e, .source = "fetch" });
|
log.info(.browser, "invalid json", .{ .err = e, .source = "Response" });
|
||||||
return error.SyntaxError;
|
return error.SyntaxError;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user