From 5844d556767675494a2545aa837b3e925ab20e1f Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Wed, 14 Oct 2015 16:52:53 -0700 Subject: [PATCH] Bug 1194555 - Part 1: Remove RunReportersForThisProcess. r=njn RunReportersForThisProcess is no longer used and will no longer work once we have async reporters. --- xpcom/base/nsIMemoryReporter.idl | 9 ------ xpcom/base/nsMemoryReporterManager.cpp | 42 -------------------------- 2 files changed, 51 deletions(-) diff --git a/xpcom/base/nsIMemoryReporter.idl b/xpcom/base/nsIMemoryReporter.idl index 39e3be823b1..5ff89411259 100644 --- a/xpcom/base/nsIMemoryReporter.idl +++ b/xpcom/base/nsIMemoryReporter.idl @@ -520,15 +520,6 @@ nsresult RegisterNonJSSizeOfTab(NonJSSizeOfTabFn aSizeOfTabFn); } #if defined(MOZ_DMD) && !defined(MOZILLA_XPCOMRT_API) -namespace mozilla { -namespace dmd { -// This runs all the memory reporters in the current process but does nothing -// with the results; i.e. it does the minimal amount of work possible for DMD -// to do its thing. It does nothing with child processes. -void RunReportersForThisProcess(); -} -} - #if !defined(MOZ_MEMORY) #error "MOZ_DMD requires MOZ_MEMORY" #endif diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index 5139ab2af36..69db11fc37c 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -2500,45 +2500,3 @@ DEFINE_REGISTER_SIZE_OF_TAB(NonJS); #undef GET_MEMORY_REPORTER_MANAGER } // namespace mozilla - -#if defined(MOZ_DMD) - -namespace mozilla { -namespace dmd { - -class DoNothingCallback final : public nsIHandleReportCallback -{ -public: - NS_DECL_ISUPPORTS - - NS_IMETHOD Callback(const nsACString& aProcess, const nsACString& aPath, - int32_t aKind, int32_t aUnits, int64_t aAmount, - const nsACString& aDescription, - nsISupports* aData) override - { - // Do nothing; the reporter has already reported to DMD. - return NS_OK; - } - -private: - ~DoNothingCallback() {} -}; - -NS_IMPL_ISUPPORTS(DoNothingCallback, nsIHandleReportCallback) - -void -RunReportersForThisProcess() -{ - nsCOMPtr mgr = - do_GetService("@mozilla.org/memory-reporter-manager;1"); - - nsRefPtr doNothing = new DoNothingCallback(); - - mgr->GetReportsForThisProcess(doNothing, nullptr, /* anonymize = */ false); -} - -} // namespace dmd -} // namespace mozilla - -#endif // defined(MOZ_DMD) -