зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1605674 - Stop using window.setTimeout in MockFilePickerInstance. r=kmag
Using window.setTimeout is causing a Thunderbird test to stall for not entirely clear reasons. Use dispatchToMainThread instead. Differential Revision: https://phabricator.services.mozilla.com/D59276 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d980667fad
Коммит
048ed6e9de
|
@ -244,7 +244,7 @@ MockFilePickerInstance.prototype = {
|
|||
},
|
||||
open(aFilePickerShownCallback) {
|
||||
MockFilePicker.showing = true;
|
||||
this.window.setTimeout(() => {
|
||||
Services.tm.dispatchToMainThread(() => {
|
||||
// Maybe all the pending promises are already resolved, but we want to be sure.
|
||||
Promise.all(MockFilePicker.pendingPromises)
|
||||
.then(
|
||||
|
@ -299,9 +299,9 @@ MockFilePickerInstance.prototype = {
|
|||
}
|
||||
|
||||
if (typeof MockFilePicker.afterOpenCallback == "function") {
|
||||
this.window.setTimeout(() => {
|
||||
Services.tm.dispatchToMainThread(() => {
|
||||
MockFilePicker.afterOpenCallback(this);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче