summaryrefslogtreecommitdiffstats
path: root/xpcom/build
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-04 20:53:31 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-04 20:53:31 +0200
commit580084e9e1d0355c96a54a9641df6c1fee894948 (patch)
tree5aff416b5aed2ca9e326054567d837f28c20ed25 /xpcom/build
parentfc61780b35af913801d72086456f493f63197da6 (diff)
parentb28ab55f9675f2e97dda9a4fcac0d4f5267a2bb9 (diff)
downloadUXP-2018.09.05.tar
UXP-2018.09.05.tar.gz
UXP-2018.09.05.tar.lz
UXP-2018.09.05.tar.xz
UXP-2018.09.05.zip
Merge branch 'master' into Basilisk-releasev2018.09.05
Diffstat (limited to 'xpcom/build')
-rw-r--r--xpcom/build/XPCOMInit.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
index e8ee5828a..b89f51a98 100644
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -123,6 +123,8 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
#include "nsMemoryInfoDumper.h"
#include "nsSecurityConsoleMessage.h"
#include "nsMessageLoop.h"
+#include "nss.h"
+#include "ssl.h"
#include "nsStatusReporterManager.h"
@@ -1043,6 +1045,17 @@ ShutdownXPCOM(nsIServiceManager* aServMgr)
sInitializedJS = false;
}
+ // At this point all networking threads should have been joined and the
+ // component manager is shut down. Any remaining objects that hold NSS
+ // resources (should!) have been released, so we can safely shut down NSS.
+ if (NSS_IsInitialized()) {
+ SSL_ClearSessionCache();
+ // XXX: It would be nice if we can enforce this shutdown.
+ if (NSS_Shutdown() != SECSuccess) {
+ NS_WARNING("NSS Shutdown failed - some resources are still in use");
+ }
+ }
+
// Release our own singletons
// Do this _after_ shutting down the component manager, because the
// JS component loader will use XPConnect to call nsIModule::canUnload,