Bug 1713042 - Stop browser_sessionStore.js failing by waiting for the folder tree to load. rs=bustage-fix

--HG--
extra : amend_source : a71cf81b8666a5e6096b3be579604731838ee162
This commit is contained in:
Geoff Lankow 2021-06-14 12:06:44 +12:00
Родитель 4e209858b4
Коммит cb59e3b794
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -467,6 +467,11 @@ function enter_folder(aFolder) {
// Drain the event queue prior to doing any work. It's possible that there's
// a pending setTimeout(0) that needs to get fired.
controller.sleep(0);
utils.waitFor(
() => mc.folderTreeView._rowMap,
"Timeout waiting for folder tree to be ready"
);
// if we're already selected, go back to the root...
if (mc.folderDisplay.displayedFolder == aFolder) {
enter_folder(aFolder.rootFolder);