mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
replace zig-async-io and std.http.Client with a custom HTTP client
This commit is contained in:
@@ -73,13 +73,13 @@ pub fn CDPT(comptime TypeProvider: type) type {
|
||||
pub const Browser = TypeProvider.Browser;
|
||||
pub const Session = TypeProvider.Session;
|
||||
|
||||
pub fn init(app: *App, client: TypeProvider.Client) Self {
|
||||
pub fn init(app: *App, client: TypeProvider.Client) !Self {
|
||||
const allocator = app.allocator;
|
||||
return .{
|
||||
.client = client,
|
||||
.allocator = allocator,
|
||||
.browser_context = null,
|
||||
.browser = Browser.init(app),
|
||||
.browser = try Browser.init(app),
|
||||
.message_arena = std.heap.ArenaAllocator.init(allocator),
|
||||
.browser_context_pool = std.heap.MemoryPool(BrowserContext(Self)).init(allocator),
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ const Browser = struct {
|
||||
session: ?*Session = null,
|
||||
arena: std.heap.ArenaAllocator,
|
||||
|
||||
pub fn init(app: *App) Browser {
|
||||
pub fn init(app: *App) !Browser {
|
||||
return .{
|
||||
.arena = std.heap.ArenaAllocator.init(app.allocator),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user