summaryrefslogtreecommitdiffstats
path: root/xpcom
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/base/CycleCollectedJSContext.cpp3
-rw-r--r--xpcom/base/nsCycleCollector.cpp17
-rw-r--r--xpcom/base/nsMemoryReporterManager.cpp1
-rw-r--r--xpcom/build/XPCOMInit.cpp13
-rw-r--r--xpcom/glue/nsTHashtable.h4
-rw-r--r--xpcom/string/nsReadableUtilsImpl.h2
-rw-r--r--xpcom/threads/HangMonitor.cpp2
7 files changed, 16 insertions, 26 deletions
diff --git a/xpcom/base/CycleCollectedJSContext.cpp b/xpcom/base/CycleCollectedJSContext.cpp
index 4af8fe4dd..02fc1aa4c 100644
--- a/xpcom/base/CycleCollectedJSContext.cpp
+++ b/xpcom/base/CycleCollectedJSContext.cpp
@@ -1547,9 +1547,6 @@ IncrementalFinalizeRunnable::Run()
}
}
- uint32_t duration = (uint32_t)((TimeStamp::Now() - start).ToMilliseconds());
- Telemetry::Accumulate(Telemetry::DEFERRED_FINALIZE_ASYNC, duration);
-
return NS_OK;
}
diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
index b2c15a1dd..a349e086d 100644
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -528,15 +528,6 @@ public:
#define CC_GRAPH_ASSERT(b)
#endif
-#define CC_TELEMETRY(_name, _value) \
- PR_BEGIN_MACRO \
- if (NS_IsMainThread()) { \
- Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR##_name, _value); \
- } else { \
- Telemetry::Accumulate(Telemetry::CYCLE_COLLECTOR_WORKER##_name, _value); \
- } \
- PR_END_MACRO
-
enum NodeColor { black, white, grey };
// This structure should be kept as small as possible; we may expect
@@ -2966,7 +2957,6 @@ nsCycleCollector::ScanWeakMaps()
if (failed) {
MOZ_ASSERT(false, "Ran out of memory in ScanWeakMaps");
- CC_TELEMETRY(_OOM, true);
}
}
@@ -3109,7 +3099,6 @@ nsCycleCollector::ScanIncrementalRoots()
if (failed) {
NS_ASSERTION(false, "Ran out of memory in ScanIncrementalRoots");
- CC_TELEMETRY(_OOM, true);
}
}
@@ -3171,7 +3160,6 @@ nsCycleCollector::ScanBlackNodes()
if (failed) {
NS_ASSERTION(false, "Ran out of memory in ScanBlackNodes");
- CC_TELEMETRY(_OOM, true);
}
}
@@ -3501,7 +3489,6 @@ nsCycleCollector::FixGrayBits(bool aForceGC, TimeLog& aTimeLog)
bool needGC = !mJSContext->AreGCGrayBitsValid();
// Only do a telemetry ping for non-shutdown CCs.
- CC_TELEMETRY(_NEED_GC, needGC);
if (!needGC) {
return;
}
@@ -3553,10 +3540,6 @@ nsCycleCollector::CleanupAfterCollection()
printf(".\ncc: \n");
#endif
- CC_TELEMETRY( , interval);
- CC_TELEMETRY(_VISITED_REF_COUNTED, mResults.mVisitedRefCounted);
- CC_TELEMETRY(_VISITED_GCED, mResults.mVisitedGCed);
- CC_TELEMETRY(_COLLECTED, mWhiteNodeCount);
timeLog.Checkpoint("CleanupAfterCollection::telemetry");
if (mJSContext) {
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index 2d4f3fa9c..bfeda063b 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -440,7 +440,6 @@ ResidentDistinguishedAmountHelper(int64_t* aN, bool aDoPurge)
{
#ifdef HAVE_JEMALLOC_STATS
if (aDoPurge) {
- Telemetry::AutoTimer<Telemetry::MEMORY_FREE_PURGED_PAGES_MS> timer;
jemalloc_purge_freed_pages();
}
#endif
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,
diff --git a/xpcom/glue/nsTHashtable.h b/xpcom/glue/nsTHashtable.h
index 705b0294e..830f52e88 100644
--- a/xpcom/glue/nsTHashtable.h
+++ b/xpcom/glue/nsTHashtable.h
@@ -372,7 +372,7 @@ template<class EntryType>
PLDHashNumber
nsTHashtable<EntryType>::s_HashKey(const void* aKey)
{
- return EntryType::HashKey(static_cast<const KeyTypePointer>(aKey));
+ return EntryType::HashKey(static_cast<KeyTypePointer>(aKey));
}
template<class EntryType>
@@ -381,7 +381,7 @@ nsTHashtable<EntryType>::s_MatchEntry(const PLDHashEntryHdr* aEntry,
const void* aKey)
{
return ((const EntryType*)aEntry)->KeyEquals(
- static_cast<const KeyTypePointer>(aKey));
+ static_cast<KeyTypePointer>(aKey));
}
template<class EntryType>
diff --git a/xpcom/string/nsReadableUtilsImpl.h b/xpcom/string/nsReadableUtilsImpl.h
index ff1497b51..94f18dffc 100644
--- a/xpcom/string/nsReadableUtilsImpl.h
+++ b/xpcom/string/nsReadableUtilsImpl.h
@@ -18,7 +18,7 @@ inline bool IsASCII(char16_t aChar) {
inline const char16_t* aligned(const char16_t* aPtr, const uintptr_t aMask)
{
return reinterpret_cast<const char16_t*>(
- reinterpret_cast<const uintptr_t>(aPtr) & ~aMask);
+ reinterpret_cast<uintptr_t>(aPtr) & ~aMask);
}
/**
diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp
index 6def6ed61..8003ef515 100644
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -249,8 +249,6 @@ NotifyActivity(ActivityType aActivityType)
// If we have UI activity we should reset the timer and report it
if (aActivityType == kUIActivity) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::EVENTLOOP_UI_ACTIVITY_EXP_MS,
- cumulativeUILagMS);
cumulativeUILagMS = 0;
}