mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Add navigate telemetry
This commit is contained in:
@@ -72,7 +72,6 @@ const Server = struct {
|
||||
|
||||
fn deinit(self: *Server) void {
|
||||
self.client_pool.deinit();
|
||||
self.allocator.free(self.json_version_response);
|
||||
}
|
||||
|
||||
fn queueAccept(self: *Server) void {
|
||||
@@ -467,7 +466,7 @@ pub const Client = struct {
|
||||
};
|
||||
|
||||
self.mode = .websocket;
|
||||
self.cdp = CDP.init(self.server.allocator, self, self.server.loop);
|
||||
self.cdp = CDP.init(self.server.app, self);
|
||||
return self.send(arena, response);
|
||||
}
|
||||
|
||||
@@ -1016,11 +1015,9 @@ fn websocketHeader(buf: []u8, op_code: OpCode, payload_len: usize) []const u8 {
|
||||
}
|
||||
|
||||
pub fn run(
|
||||
allocator: Allocator,
|
||||
app: *App,
|
||||
address: net.Address,
|
||||
timeout: u64,
|
||||
loop: *jsruntime.Loop,
|
||||
app: *App,
|
||||
) !void {
|
||||
// create socket
|
||||
const flags = posix.SOCK.STREAM | posix.SOCK.CLOEXEC | posix.SOCK.NONBLOCK;
|
||||
@@ -1043,7 +1040,10 @@ pub fn run(
|
||||
const vm = jsruntime.VM.init();
|
||||
defer vm.deinit();
|
||||
|
||||
var loop = app.loop;
|
||||
const allocator = app.allocator;
|
||||
const json_version_response = try buildJSONVersionResponse(allocator, address);
|
||||
defer allocator.free(json_version_response);
|
||||
|
||||
var server = Server{
|
||||
.app = app,
|
||||
|
||||
Reference in New Issue
Block a user