Zig 0.15.1

Depends on https://github.com/lightpanda-io/zig-v8-fork/pull/89
This commit is contained in:
Karl Seguin
2025-08-28 19:42:26 +08:00
parent 94960cc842
commit 1443f38e5f
51 changed files with 508 additions and 525 deletions

View File

@@ -304,19 +304,17 @@ fn sendMessageToTarget(cmd: anytype) !void {
}
const Capture = struct {
allocator: std.mem.Allocator,
buf: std.ArrayListUnmanaged(u8),
aw: std.Io.Writer.Allocating,
pub fn sendJSON(self: *@This(), message: anytype) !void {
return std.json.stringify(message, .{
return std.json.Stringify.value(message, .{
.emit_null_optional_fields = false,
}, self.buf.writer(self.allocator));
}, &self.aw.writer);
}
};
var capture = Capture{
.buf = .{},
.allocator = cmd.arena,
.aw = .init(cmd.arena),
};
cmd.cdp.dispatch(cmd.arena, &capture, params.message) catch |err| {
@@ -325,7 +323,7 @@ fn sendMessageToTarget(cmd: anytype) !void {
};
try cmd.sendEvent("Target.receivedMessageFromTarget", .{
.message = capture.buf.items,
.message = capture.aw.written(),
.sessionId = params.sessionId,
}, .{});
}