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) -