diff --git a/src/engines/v8/v8.zig b/src/engines/v8/v8.zig index 2bbf4da..80cd6ec 100644 --- a/src/engines/v8/v8.zig +++ b/src/engines/v8/v8.zig @@ -625,6 +625,10 @@ pub const JSValue = struct { return error.JSValueTypeNotHandled; }; } + + pub fn externalEntry(self: JSValue) ?*ExternalEntry { + return getExternalEntry(self.value); + } }; pub const TryCatch = struct { @@ -750,6 +754,11 @@ pub const Inspector = struct { const generatePreview = false; // We do not want to expose this as a parameter for now return self.session.wrapObject(env.isolate, env.js_ctx.?, jsValue, groupName, generatePreview); } + + pub fn getValueByObjectId(self: Inspector, allocator: std.mem.Allocator, object_id: []const u8) !JSValue { + const unwrapped = try self.session.unwrapObject(allocator, object_id); + return .{ .value = unwrapped.value }; // The values context and groupId are not used here + } }; // When we return a Zig instance to V8, we wrap it in a v8.Object. That wrapping diff --git a/vendor/zig-v8 b/vendor/zig-v8 index b6b5ed5..89538df 160000 --- a/vendor/zig-v8 +++ b/vendor/zig-v8 @@ -1 +1 @@ -Subproject commit b6b5ed5bc6ef81474485bd9f0f8518216eaa9d78 +Subproject commit 89538df6f2b8eb3c97709c1118c395c8c04ebd3a