chore: swallow TargetClosedErrors in beforeunload dialog.dismiss()#39788
chore: swallow TargetClosedErrors in beforeunload dialog.dismiss()#39788hbenl wants to merge 1 commit intomicrosoft:mainfrom
Conversation
0554def to
5450e51
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"7 failed 5451 passed, 340 skipped Merge workflow run. |
Test results for "tests 1"2 failed 8 flaky38804 passed, 845 skipped Merge workflow run. |
| try { | ||
| await this._channel.dismiss(); | ||
| } catch (e) { | ||
| if (isTargetClosedError(e) && this.type() === 'beforeunload') |
See #39701 (comment). This swallows TargetClosedErrors only for
beforeunloaddialogs because this test checks thatdialog.dismiss()will throw for alert dialogs.