Bug 1061324 follow up - Intermittent fix and app closing hardening.
Merge pull request #23914 from etiennesegonzac/bug-1061324-follow-up

Bug 1061324 follow up - Intermittent fix and app closing hardening. r=21