docs: function modalDialog_waitForDialog(aTimeout) {
      var timeout = aTimeout || TIMEOUT_MODAL_DIALOG;
  
      if (!this._observer) {
        return;
      }
  
      try {
        mozmill.utils.waitFor(function () {
          return this.finished;
        }, "Modal dialog has been found and processed", timeout, undefined, this);
  
        // Forward the raised exception so we can detect failures in modal dialogs
        if (this._observer.exception) {
          throw this._observer.exception;
        }
      }
      finally {
        this.stop();
      }
    }