fix(chromium): race between oopif attach and context clear (#33729)

This commit is contained in:
Dmitry Gozman 2024-11-22 17:35:35 +00:00 committed by GitHub
parent 7e09aa07de
commit 4696dd8682
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -731,6 +731,10 @@ class FrameSession {
if (!frame)
return; // Subtree may be already gone due to renderer/browser race.
this._page._frameManager.removeChildFramesRecursively(frame);
for (const [contextId, context] of this._contextIdToContext) {
if (context.frame === frame)
this._onExecutionContextDestroyed(contextId);
}
const frameSession = new FrameSession(this._crPage, session, targetId, this);
this._crPage._sessions.set(targetId, frameSession);
frameSession._initialize(false).catch(e => e);