Need async nsIPrompt API
Categories
(Toolkit :: General, defect)
Tracking
()
People
(Reporter: Dolske, Assigned: pbz)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
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.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D66450
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D67505
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D67506
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
This is the implementation for the newly added async prompt methods in nsIPromptService.
Async prompt methods return a Promise which resolves an nsIPropertyBag with the
prompt result values.
Depends on D69595
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/091a64a38136 nsIPromptService: Added async prompt methods. r=johannh https://hg.mozilla.org/integration/autoland/rev/7262ae6d42ec Updated prompt tests to include async prompting. r=johannh
Comment 7•4 years ago
|
||
Backed out for mochitest failures on test_prompt.html.
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=298673203&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=298672486&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/b7a400987981a46df5381200e6cb675d702b3c21
Pushed by pzuhlcke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b16151863369 nsIPromptService: Added async prompt methods. r=johannh https://hg.mozilla.org/integration/autoland/rev/bace62107e14 Updated prompt tests to include async prompting. r=johannh
Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b16151863369
https://hg.mozilla.org/mozilla-central/rev/bace62107e14
Assignee | ||
Comment 10•4 years ago
|
||
Sorry, forgot to mark as 'leave-open'. Still missing a patch (is up for review).
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Description
•