Handle outparams when a function returns a Promise
Categories
(Core :: XPConnect, enhancement)
Tracking
()
People
(Reporter: enndeakin, Unassigned)
References
(Blocks 1 open bug)
Details
nsIAuthPrompt added a method with a signature:
Promise asyncPromptPassword(..., inout wstring pwd);
The implementation is in LoginManagerAuthPrompter.sys.mjs.
This function returns a Promise. The xpcom layer handles and coverts the out parameters when the Promise is returned, which is the first use of 'await' within the function, even though the implementation function isn't actually finished.
Currently, this isn't an issue as the out parameter is assigned before the use of await. However, with bug 1846036, an earlier 'await' is added, and the function when complete ends up with a null value for the out parameter 'pwd'.
It would be ideal if this could somehow be handled, rather than having to convert the out parameters to something that is returned via the promise when it resolves.
Comment 1•9 months ago
|
||
The severity field is not set for this bug.
:farre, could you have a look please?
For more information, please visit BugBot documentation.
Updated•9 months ago
|
Description
•