Skip to content

Commit 4daeb57

Browse files
sirtimidclaude
andcommitted
fix(kernel-browser-runtime): snapshot map keys before iteration in terminateAll
Use Array.from() to snapshot uiVats keys before iterating, consistent with the pattern in PlatformServicesServer.ts. Prevents potential issues from map modification during iteration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8c8c2fa commit 4daeb57

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/kernel-browser-runtime/src/ui/UIOrchestrator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export class UIOrchestrator {
205205
*/
206206
terminateAll(): void {
207207
this.#logger.info('Terminating all UI vats');
208-
for (const id of this.#uiVats.keys()) {
208+
for (const id of Array.from(this.#uiVats.keys())) {
209209
this.terminate(id);
210210
}
211211
}

0 commit comments

Comments
 (0)