From 81dfa61777ee52cbae52ff2b609fffc2f8568bed Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 30 Jul 2023 08:34:41 +0200 Subject: [PATCH] Ensure that failing to open the password dialog once won't permanently disable it (PR 15335 follow-up) *Please note:* This situation should never happen in practice, but it nonetheless cannot hurt to fix this. If the `PasswordPrompt.open` method would ever be called synchronously back-to-back *and* if opening of the dialog fails the first time, then the second invocation would remain pending indefinitely since we just clear out the capability. --- web/password_prompt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/password_prompt.js b/web/password_prompt.js index 01251a1f8..66b17dd56 100644 --- a/web/password_prompt.js +++ b/web/password_prompt.js @@ -74,7 +74,7 @@ class PasswordPrompt { try { await this.overlayManager.open(this.dialog); } catch (ex) { - this.#activeCapability = null; + this.#activeCapability.resolve(); throw ex; }