mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
cdp: use for...else instead of found bool
This commit is contained in:
@@ -277,15 +277,12 @@ fn resolveNode(cmd: anytype) !void {
|
|||||||
var js_context = page.main_context;
|
var js_context = page.main_context;
|
||||||
if (params.executionContextId) |context_id| {
|
if (params.executionContextId) |context_id| {
|
||||||
if (js_context.v8_context.debugContextId() != context_id) {
|
if (js_context.v8_context.debugContextId() != context_id) {
|
||||||
var found = false;
|
|
||||||
for (bc.isolated_worlds.items) |*isolated_world| {
|
for (bc.isolated_worlds.items) |*isolated_world| {
|
||||||
js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound);
|
js_context = &(isolated_world.executor.js_context orelse return error.ContextNotFound);
|
||||||
if (js_context.v8_context.debugContextId() == context_id) {
|
if (js_context.v8_context.debugContextId() == context_id) {
|
||||||
found = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} else return error.ContextNotFound;
|
||||||
if (!found) return error.ContextNotFound;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user