@@ -1308,12 +1308,12 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
13081308 }
13091309
13101310 // Gets a value by object ID regardless of which context it is in.
1311- // unwrapping the object also tells us the context, for now we assume it is always the default one.
1312- // The executor argument is likely to change to somthing to allow us to find the right Executer with the given context
1313- pub fn getValueByObjectId (self : Inspector , allocator : std.mem.Allocator , executor : * const Executor , object_id : []const u8 ) ! Value {
1311+ pub fn getNodePtr (self : * const Inspector , allocator : Allocator , object_id : []const u8 ) ! ? * anyopaque {
13141312 const unwrapped = try self .session .unwrapObject (allocator , object_id );
1315- // std.debug.assert(executor.context.handle == unwrapped.context.handle);
1316- return .{ .value = unwrapped .value , .executor = executor }; // The values context and groupId are not used here
1313+ // The values context and groupId are not used here
1314+ const toa = getTaggedAnyOpaque (unwrapped .value ) orelse return null ;
1315+ if (toa .subtype == null or toa .subtype != .node ) return error .ObjectIdIsNotANode ;
1316+ return toa .ptr ;
13171317 }
13181318 };
13191319
@@ -1328,10 +1328,6 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
13281328 const executor = self .executor ;
13291329 return valueToString (allocator , self .value , executor .isolate , executor .context );
13301330 }
1331-
1332- pub fn taggedAnyOpaque (self : Value ) ? * TaggedAnyOpaque {
1333- return getTaggedAnyOpaque (self .value );
1334- }
13351331 };
13361332
13371333 // Reverses the mapZigInstanceToJs, making sure that our TaggedAnyOpaque
0 commit comments