Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: nss/lib/nss/nssinit.c

Issue 319593003: Update to NSS 3.16.2 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Remove unused function SEC_NumberOrNameStringToOIDTag Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/nss/nssinit.c
diff --git a/nss/lib/nss/nssinit.c b/nss/lib/nss/nssinit.c
index 83e50d2c45bb68eae30e6ee4a9f7877412f26515..208e71dd3cd390643526d975350bd3b0c1f8fa46 100644
--- a/nss/lib/nss/nssinit.c
+++ b/nss/lib/nss/nssinit.c
@@ -1099,14 +1099,6 @@ nss_Shutdown(void)
shutdownRV = SECFailure;
}
pk11sdr_Shutdown();
- /*
- * A thread's error stack is automatically destroyed when the thread
- * terminates, except for the primordial thread, whose error stack is
- * destroyed by PR_Cleanup. Since NSS is usually shut down by the
- * primordial thread and many NSS-based apps don't call PR_Cleanup,
- * we destroy the calling thread's error stack here.
- */
- nss_DestroyErrorStack();
nssArena_Shutdown();
if (status == PR_FAILURE) {
if (NSS_GetError() == NSS_ERROR_BUSY) {
@@ -1114,6 +1106,16 @@ nss_Shutdown(void)
}
shutdownRV = SECFailure;
}
+ /*
+ * A thread's error stack is automatically destroyed when the thread
+ * terminates, except for the primordial thread, whose error stack is
+ * destroyed by PR_Cleanup. Since NSS is usually shut down by the
+ * primordial thread and many NSS-based apps don't call PR_Cleanup,
+ * we destroy the calling thread's error stack here. This must be
+ * done after any NSS_GetError call, otherwise NSS_GetError will
+ * create the error stack again.
+ */
+ nss_DestroyErrorStack();
nssIsInitted = PR_FALSE;
temp = nssInitContextList;
nssInitContextList = NULL;

Powered by Google App Engine
This is Rietveld 408576698