cdp: use for...else instead of found bool

This commit is contained in:
Pierre Tachoire
2025-09-10 11:29:08 +02:00
parent 94fe34bd10
commit 5d1e17c598

View File

@@ -277,15 +277,12 @@ fn resolveNode(cmd: anytype) !void {
var js_context = page.main_context;
if (params.executionContextId) |context_id| {
if (js_context.v8_context.debugContextId() != context_id) {
var found = false;
for (bc.isolated_worlds.items) |*isolated_world| {
js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound);
if (js_context.v8_context.debugContextId() == context_id) {
found = true;
break;
}
}
if (!found) return error.ContextNotFound;
} else return error.ContextNotFound;
}
}