Status

()

Toolkit
General
2 years ago
2 years ago

People

(Reporter: Dolske, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
The current nsIPrompt APIs are used all over (and in extensions too), but they're all synchronous APIs... Call a prompt, wait for the user to interact, call returns. This has a number of problems -- there's an extra event loop spinning while the prompt is open, and hangs can result when other things spin the event loop (such as another prompt). This can also make converting prompts to tab-modal form difficult -- callers can be in an intermediate state when the tab is closed, and verifying correctness in such cases is tricky and non-obvious.

We should have a version of the nsIPrompt API that's asynchronous, using callbacks or Promises so that callers do not have to block waiting for the prompt to complete.

Note that nsIAuthPrompt2 has asyncPromptAuth(), which is kinda what we want, but it's actually implemented in the prompt code with a normal synchronous prompt.
(Reporter)

Updated

2 years ago
Blocks: 1271852
You need to log in before you can comment on or make changes to this bug.