Skip to content

Commit b59ab4e

Browse files
committed
update to new v8 with simpler errors
1 parent 696cc72 commit b59ab4e

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/engines/v8/v8.zig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -755,15 +755,8 @@ pub const Inspector = struct {
755755
return self.session.wrapObject(env.isolate, env.js_ctx.?, jsValue, groupName, generatePreview);
756756
}
757757

758-
pub fn getValueByObjectId(self: Inspector, allocator: std.mem.Allocator, objectId: []const u8) !JSValue {
759-
const result = try self.session.unwrapObject(allocator, objectId);
760-
const unwrapped = switch (result) {
761-
.err => |err| {
762-
log.err("Unable to unwrap object {s}: {s}", .{ objectId, if (err) |e| e else "No error message" });
763-
return error.UnwrapObjectFailed;
764-
},
765-
.ok => |value| value,
766-
};
758+
pub fn getValueByObjectId(self: Inspector, allocator: std.mem.Allocator, object_id: []const u8) !JSValue {
759+
const unwrapped = try self.session.unwrapObject(allocator, object_id);
767760
return .{ .value = unwrapped.value }; // The values context and groupId are not used here
768761
}
769762
};

vendor/zig-v8

0 commit comments

Comments
 (0)