diff --git a/src/cdp/cdp.zig b/src/cdp/cdp.zig index 7fc92a83..77e7071c 100644 --- a/src/cdp/cdp.zig +++ b/src/cdp/cdp.zig @@ -760,10 +760,7 @@ const IsolatedWorld = struct { grant_universal_access: bool, pub fn deinit(self: *IsolatedWorld) void { - if (self.context) |ctx| { - self.browser.env.destroyContext(ctx); - self.context = null; - } + self.removeContext() catch {}; self.browser.arena_pool.release(self.arena); }