Bug 1854873 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Ben Campbell from comment #0)
> Does `be_in_folder` have some special mechanism to ensure it waits until the folder parse triggered by `UpdateFolder()` has completed?
> Or is the test actually wrong, and it's just a lucky quirk of the existing code which means the folder parse completes before `be_in_folder` returns?

Looks like it. [This code calls `updateFolder`](https://searchfox.org/comm-central/rev/61f4da66fcc6c148718dee078200d201a60abdbf/mail/modules/DBViewWrapper.jsm#73) then nothing happens until [we get notified about it finishing](https://searchfox.org/comm-central/rev/61f4da66fcc6c148718dee078200d201a60abdbf/mail/modules/DBViewWrapper.jsm#205).
(In reply to Ben Campbell from comment #0)
> Does `be_in_folder` have some special mechanism to ensure it waits until the folder parse triggered by `UpdateFolder()` has completed?
> Or is the test actually wrong, and it's just a lucky quirk of the existing code which means the folder parse completes before `be_in_folder` returns?

~~Looks like it. [This code calls `updateFolder`](https://searchfox.org/comm-central/rev/61f4da66fcc6c148718dee078200d201a60abdbf/mail/modules/DBViewWrapper.jsm#73) then nothing happens until [we get notified about it finishing](https://searchfox.org/comm-central/rev/61f4da66fcc6c148718dee078200d201a60abdbf/mail/modules/DBViewWrapper.jsm#205).~~ This doesn't really answer the question, I got a bit sidetracked.

Back to Bug 1854873 Comment 1