mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
Share the HTTP client globally
This commit is contained in:
@@ -118,7 +118,7 @@ const TestCDP = main.CDPT(struct {
|
||||
});
|
||||
|
||||
const TestContext = struct {
|
||||
app: App,
|
||||
app: *App,
|
||||
client: ?Client = null,
|
||||
cdp_: ?TestCDP = null,
|
||||
arena: std.heap.ArenaAllocator,
|
||||
@@ -136,7 +136,7 @@ const TestContext = struct {
|
||||
self.client = Client.init(self.arena.allocator());
|
||||
// Don't use the arena here. We want to detect leaks in CDP.
|
||||
// The arena is only for test-specific stuff
|
||||
self.cdp_ = TestCDP.init(&self.app, &self.client.?);
|
||||
self.cdp_ = TestCDP.init(self.app, &self.client.?);
|
||||
}
|
||||
return &self.cdp_.?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user