mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 814430 - Shutdown network on profile-change-net-teardown. r=mcmanus
This commit is contained in:
parent
6523951e3d
commit
4b7a10081c
@ -664,7 +664,7 @@ nsIOService::SetOffline(bool offline)
|
||||
{
|
||||
// When someone wants to go online (!offline) after we got XPCOM shutdown
|
||||
// throw ERROR_NOT_AVAILABLE to prevent return to online state.
|
||||
if (mShutdown && !offline)
|
||||
if ((mShutdown || mOfflineForProfileChange) && !offline)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// SetOffline() may re-enter while it's shutting down services.
|
||||
@ -741,7 +741,7 @@ nsIOService::SetOffline(bool offline)
|
||||
}
|
||||
|
||||
// Don't notify here, as the above notifications (if used) suffice.
|
||||
if (mShutdown && mOffline) {
|
||||
if ((mShutdown || mOfflineForProfileChange) && mOffline) {
|
||||
// be sure to try and shutdown both (even if the first fails)...
|
||||
// shutdown dns service first, because it has callbacks for socket transport
|
||||
if (mDNSService) {
|
||||
@ -912,8 +912,8 @@ nsIOService::Observe(nsISupports *subject,
|
||||
}
|
||||
else if (!strcmp(topic, kProfileChangeNetTeardownTopic)) {
|
||||
if (!mOffline) {
|
||||
SetOffline(true);
|
||||
mOfflineForProfileChange = true;
|
||||
SetOffline(true);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(topic, kProfileChangeNetRestoreTopic)) {
|
||||
|
Loading…
Reference in New Issue
Block a user