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
This commit is contained in:
FranklinDM 2022-04-18 02:52:07 +08:00 committed by roytam1
commit 031a928950

View file

@ -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())) {