Bug 1885279 - Fix timing issue in messageDisplayAction API. r=mkmelin
I am not 100% sure why this is popping up now, but it is not a recent regression, but a real bug. The code in question was introduced in Bug 1803255. We are currently not awaiting the call to `super.updateWindow()`. This patch adds the same mechanism which is already used in `ExtensionToolbarButtons.sys.mjs`: https://searchfox.org/comm-central/rev/a0bc09a88c7e060ba8cafb62a40dc0f36153d8d2/mail/components/extensions/ExtensionToolbarButtons.sys.mjs#647-653 Differential Revision: https://phabricator.services.mozilla.com/D204584 --HG-- extra : amend_source : 86945d83b709d56067be8295b0d08ee24fb49a3f
This commit is contained in:
Родитель
10629c8c87
Коммит
d5de4d4aa3
|
@ -106,11 +106,13 @@ this.messageDisplayAction = class extends ToolbarButtonAPI {
|
|||
* Overrides the super class to update every about:message in this window.
|
||||
*/
|
||||
async updateWindow(window) {
|
||||
const promises = [];
|
||||
for (const bc of window.browsingContext.getAllBrowsingContextsInSubtree()) {
|
||||
if (bc.currentURI.spec == "about:message") {
|
||||
super.updateWindow(bc.window);
|
||||
promises.push(super.updateWindow(bc.window));
|
||||
}
|
||||
}
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче