Skip to content

Commit

Permalink
Bug 1710370 - [marionette] Only handle an opened modal dialog when an…
Browse files Browse the repository at this point in the history
… active session is present. r=marionette-reviewers,jgraham

Differential Revision: https://phabricator.services.mozilla.com/D114997
  • Loading branch information
whimboo committed May 19, 2021
1 parent febafb8 commit 14cfbee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testing/marionette/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ GeckoDriver.prototype.QueryInterface = ChromeUtils.generateQI([
* during the session's lifetime.
*/
GeckoDriver.prototype.handleModalDialog = function(action, dialog) {
if (!this.currentSession) {
return;
}

if (action === modal.ACTION_OPENED) {
this.dialog = new modal.Dialog(() => this.curBrowser, dialog);
this.getActor().notifyDialogOpened();
Expand Down

0 comments on commit 14cfbee

Please sign in to comment.