diff --git a/src/engines/v8/v8.zig b/src/engines/v8/v8.zig index 55a8ac4..fc052bb 100644 --- a/src/engines/v8/v8.zig +++ b/src/engines/v8/v8.zig @@ -136,17 +136,9 @@ pub const Env = struct { } pub fn setUserContext(self: *Env, userctx: public.UserContext) anyerror!void { - // you can't replace a user context defined in init. - if (self.nat_ctx.userctx != null) return error.UserContextExists; - self.nat_ctx.userctx = userctx; } - pub fn getUserContext(self: *Env) ?*public.UserContext { - if (self.nat_ctx.userctx) |*ctx| return ctx; - return null; - } - // load user-defined Types into Javascript environement pub fn load(self: Env, js_types: []usize) anyerror!void { var tpls: [gen.Types.len]TPL = undefined; diff --git a/src/interfaces.zig b/src/interfaces.zig index c63874c..3a85d94 100644 --- a/src/interfaces.zig +++ b/src/interfaces.zig @@ -55,8 +55,6 @@ pub fn Env( userctx: public.UserContext, ) anyerror!void); - assertDecl(T, "getUserContext", fn (self: *T) ?*public.UserContext); - // start() assertDecl(T, "start", fn ( self: *T,