Back out 4537337759b7 (bug 910517) because nobody expects the talos inquisition

This commit is contained in:
Phil Ringnalda
2013-09-04 22:42:06 -07:00
parent b286145767
commit 6e1be50ee9
67 changed files with 1297 additions and 857 deletions

View File

@@ -48,18 +48,18 @@ GetObserverServiceLog()
namespace mozilla {
class ObserverServiceReporter MOZ_FINAL : public nsIMemoryReporter
class ObserverServiceReporter MOZ_FINAL : public nsIMemoryMultiReporter
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMEMORYREPORTER
NS_DECL_NSIMEMORYMULTIREPORTER
protected:
static const size_t kSuspectReferentCount = 1000;
static PLDHashOperator CountReferents(nsObserverList* aObserverList,
void* aClosure);
};
NS_IMPL_ISUPPORTS1(ObserverServiceReporter, nsIMemoryReporter)
NS_IMPL_ISUPPORTS1(ObserverServiceReporter, nsIMemoryMultiReporter)
NS_IMETHODIMP
ObserverServiceReporter::GetName(nsACString& aName)
@@ -128,7 +128,7 @@ ObserverServiceReporter::CountReferents(nsObserverList* aObserverList,
}
NS_IMETHODIMP
ObserverServiceReporter::CollectReports(nsIMemoryReporterCallback* cb,
ObserverServiceReporter::CollectReports(nsIMemoryMultiReporterCallback* cb,
nsISupports* aClosure)
{
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
@@ -220,14 +220,14 @@ void
nsObserverService::RegisterReporter()
{
mReporter = new ObserverServiceReporter();
NS_RegisterMemoryReporter(mReporter);
NS_RegisterMemoryMultiReporter(mReporter);
}
void
nsObserverService::Shutdown()
{
if (mReporter) {
NS_UnregisterMemoryReporter(mReporter);
NS_UnregisterMemoryMultiReporter(mReporter);
}
mShuttingDown = true;