Skip to content

Commit cb99fc8

Browse files
Bug 1970598 - [remote] Avoid log pollution from short lived iframes in WindowManager r=webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D262317
1 parent 678e86b commit cb99fc8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

remote/shared/WindowManager.sys.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,11 @@ class WindowManager {
536536
const { browsingContext } = data;
537537

538538
const window = this.#getBrowsingContextWindow(browsingContext);
539+
if (!window) {
540+
// Short-lived iframes might already be disconnected from their parent
541+
// window.
542+
return;
543+
}
539544
this.#clientWindowIds.set(browsingContext, this.getIdForWindow(window));
540545
};
541546
}

0 commit comments

Comments
 (0)