Skip to content

Commit 2b73212

Browse files
committed
fix double dereference
1 parent 2e0ec74 commit 2b73212

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/browser/browser.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ pub const Page = struct {
434434
// replace the user context document with the new one.
435435
try session.env.setUserContext(.{
436436
.document = html_doc,
437-
.http_client = @ptrCast(&self.session.http_client),
437+
.http_client = @ptrCast(self.session.http_client),
438438
});
439439

440440
// browse the DOM tree to retrieve scripts
@@ -634,7 +634,6 @@ pub const Page = struct {
634634
return arr.items;
635635
}
636636

637-
638637
fn fetchScript(self: *const Page, s: *const Script) !void {
639638
const arena = self.arena;
640639
const body = try self.fetchData(arena, s.src, null);

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn main() !void {
9292
defer vm.deinit();
9393

9494
// browser
95-
var browser = Browser.init(&app);
95+
var browser = try Browser.init(&app);
9696
defer browser.deinit();
9797

9898
var session = try browser.newSession({});

0 commit comments

Comments
 (0)