Bug 1899887 - Fix race condition in mailto test, r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D213605
This commit is contained in:
Max Christian Pohle
2024-06-18 23:56:33 +00:00
parent c895daa5dd
commit 87f35f6c5c

View File

@@ -4361,8 +4361,6 @@ var TabsProgressListener = {
return;
}
Services.obs.notifyObservers(aBrowser, "mailto::onLocationChange", aFlags);
// Only need to call locationChange if the PopupNotifications object
// for this window has already been initialized (i.e. its getter no
// longer exists)
@@ -4377,6 +4375,10 @@ var TabsProgressListener = {
gBrowser.readNotificationBox(aBrowser)?.removeTransientNotifications();
// Notify the mailto notification creation code _after_ clearing transient
// notifications, so its notification does not immediately get removed.
Services.obs.notifyObservers(aBrowser, "mailto::onLocationChange", aFlags);
FullZoom.onLocationChange(aLocationURI, false, aBrowser);
CaptivePortalWatcher.onLocationChange(aBrowser);
},