From 031a928950755f26bcc8d346b0475000817d3154 Mon Sep 17 00:00:00 2001 From: FranklinDM Date: Mon, 18 Apr 2022 02:52:07 +0800 Subject: [PATCH] Issue #738 - Follow-up: Remove explicit session cache cleanup routine from ShutdownNSS This is no longer needed because the call to SSL_ConfigServerSessionIDCache on startup was already removed (see 1425f020c47b3cbe134f71717299714aead28502), meaning LocksInitializedEarly does not become true and only causes an assertion on debug builds. On the other hand, SSL_ClearSessionCache is already called on XPCOM shutdown and calling it again here is redundant. Additional context: https://bugzilla.mozilla.org/show_bug.cgi?id=1485087#c5 Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1485087 --- security/manager/ssl/nsNSSComponent.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp index 6e6d614410..d58abde06a 100644 --- a/security/manager/ssl/nsNSSComponent.cpp +++ b/security/manager/ssl/nsNSSComponent.cpp @@ -1946,10 +1946,6 @@ nsNSSComponent::ShutdownNSS() #ifndef MOZ_NO_SMART_CARDS ShutdownSmartCardThreads(); #endif - SSL_ClearSessionCache(); - // TLSServerSocket may be run with the session cache enabled. This ensures - // those resources are cleaned up. - Unused << SSL_ShutdownServerSessionIDCache(); MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("evaporating psm resources")); if (NS_FAILED(nsNSSShutDownList::evaporateAllNSSResources())) {