@@ -1371,12 +1371,12 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
13711371 }
13721372
13731373 // Gets a value by object ID regardless of which context it is in.
1374- // unwrapping the object also tells us the context, for now we assume it is always the default one.
1375- // The executor argument is likely to change to somthing to allow us to find the right Executer with the given context
1376- pub fn getValueByObjectId (self : Inspector , allocator : std.mem.Allocator , executor : * const Executor , object_id : []const u8 ) ! Value {
1374+ pub fn getNodePtr (self : * const Inspector , allocator : Allocator , object_id : []const u8 ) ! ? * anyopaque {
13771375 const unwrapped = try self .session .unwrapObject (allocator , object_id );
1378- // std.debug.assert(executor.context.handle == unwrapped.context.handle);
1379- return .{ .value = unwrapped .value , .executor = executor }; // The values context and groupId are not used here
1376+ // The values context and groupId are not used here
1377+ const toa = getTaggedAnyOpaque (unwrapped .value ) orelse return null ;
1378+ if (toa .subtype == null or toa .subtype != .node ) return error .ObjectIdIsNotANode ;
1379+ return toa .ptr ;
13801380 }
13811381 };
13821382
@@ -1391,10 +1391,6 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
13911391 const executor = self .executor ;
13921392 return valueToString (allocator , self .value , executor .isolate , executor .context );
13931393 }
1394-
1395- pub fn taggedAnyOpaque (self : Value ) ? * TaggedAnyOpaque {
1396- return getTaggedAnyOpaque (self .value );
1397- }
13981394 };
13991395
14001396 // Reverses the mapZigInstanceToJs, making sure that our TaggedAnyOpaque
0 commit comments