mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1843384 - Crash in [@ shutdownhang | mozilla::net::nsSocketTransportService::SetOffline] r=valentin,necko-reviewers
We abort the re-initialization of the socketTransportService during shutdown to prevent a deadlock. Differential Revision: https://phabricator.services.mozilla.com/D187915
This commit is contained in:
parent
853c898826
commit
aa287f4e06
@ -425,6 +425,13 @@ nsresult nsIOService::InitializeCaptivePortalService() {
|
||||
nsresult nsIOService::InitializeSocketTransportService() {
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) {
|
||||
LOG(
|
||||
("nsIOService aborting InitializeSocketTransportService because of app "
|
||||
"shutdown"));
|
||||
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||
}
|
||||
|
||||
if (!mSocketTransportService) {
|
||||
mSocketTransportService =
|
||||
do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
|
||||
|
Loading…
Reference in New Issue
Block a user