Skip to content

Commit 38d9649

Browse files
Merge pull request #249 from lightpanda-io/inspector
Fix addObject
2 parents 0d6a38b + 2d3a4d0 commit 38d9649

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/engines/v8/v8.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ pub const Env = struct {
274274
}
275275

276276
// add a Native object in the Javascript context
277-
pub fn addObject(self: Env, obj: anytype, name: []const u8) anyerror!void {
277+
pub fn addObject(self: *Env, obj: anytype, name: []const u8) anyerror!void {
278278
if (self.js_ctx == null) {
279279
return error.EnvNotStarted;
280280
}
281281
return createJSObject(
282282
self.nat_ctx.alloc,
283-
self.nat_ctx,
283+
&self.nat_ctx,
284284
obj,
285285
name,
286286
self.js_ctx.?.getGlobal(),

src/interfaces.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn Env(
8484

8585
// addObject() from native api into JS
8686
assertDecl(T, "addObject", fn (
87-
self: T,
87+
self: *T,
8888
obj: anytype,
8989
name: []const u8,
9090
) anyerror!void);

0 commit comments

Comments
 (0)