Reduce allocations made during request interception

Stream (to json) the Transfer as a request and response object in the various
network interception-related events (e.g. Network.responseReceived).

Add a page.request_intercepted boolean flag for CDP to signal the page that
requests have been intercepted, allowing Page.wait to prioritize intercept
handling (or, at least, not block it).
This commit is contained in:
Karl Seguin
2025-08-15 14:01:57 +08:00
parent d9ed4cfca8
commit 01223601f2
6 changed files with 280 additions and 155 deletions

View File

@@ -73,7 +73,9 @@ fn createBrowserContext(cmd: anytype) !void {
originsWithUniversalNetworkAccess: ?[]const []const u8 = null,
});
if (params) |p| {
if (p.disposeOnDetach or p.proxyBypassList != null or p.originsWithUniversalNetworkAccess != null) std.debug.print("Target.createBrowserContext: Not implemented param set\n", .{});
if (p.disposeOnDetach or p.proxyBypassList != null or p.originsWithUniversalNetworkAccess != null) {
log.warn(.cdp, "not implemented", .{ .feature = "Target.createBrowserContext: Not implemented param set" });
}
}
const bc = cmd.createBrowserContext() catch |err| switch (err) {