Skip to content

Commit

Permalink
Merge pull request #249 from lightpanda-io/inspector
Browse files Browse the repository at this point in the history
Fix addObject
  • Loading branch information
francisbouvier authored Oct 16, 2024
2 parents 0d6a38b + 2d3a4d0 commit 38d9649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/engines/v8/v8.zig
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ pub const Env = struct {
}

// add a Native object in the Javascript context
pub fn addObject(self: Env, obj: anytype, name: []const u8) anyerror!void {
pub fn addObject(self: *Env, obj: anytype, name: []const u8) anyerror!void {
if (self.js_ctx == null) {
return error.EnvNotStarted;
}
return createJSObject(
self.nat_ctx.alloc,
self.nat_ctx,
&self.nat_ctx,
obj,
name,
self.js_ctx.?.getGlobal(),
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces.zig
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn Env(

// addObject() from native api into JS
assertDecl(T, "addObject", fn (
self: T,
self: *T,
obj: anytype,
name: []const u8,
) anyerror!void);
Expand Down

0 comments on commit 38d9649

Please sign in to comment.