Fix executor used in resolveNode

This commit is contained in:
sjorsdonkers
2025-04-22 11:11:46 +02:00
committed by Sjors
parent 8897d9179c
commit 09850d7500
5 changed files with 49 additions and 33 deletions

View File

@@ -134,6 +134,7 @@ fn resolveNode(cmd: anytype) !void {
if (executor.context.debugContextId() != context_id) {
const isolated_world = bc.isolated_world orelse return error.ContextNotFound;
executor = isolated_world.executor;
if (executor.context.debugContextId() != context_id) return error.ContextNotFound;
}
}
@@ -143,7 +144,7 @@ fn resolveNode(cmd: anytype) !void {
// node._node is a *parser.Node we need this to be able to find its most derived type e.g. Node -> Element -> HTMLElement
// So we use the Node.Union when retrieve the value from the environment
const remote_object = try bc.session.inspector.getRemoteObject(
bc.session.executor,
executor,
params.objectGroup orelse "",
try dom_node.Node.toInterface(node._node),
);