mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1194555 - Part 1: Remove RunReportersForThisProcess. r=njn
RunReportersForThisProcess is no longer used and will no longer work once we have async reporters.
This commit is contained in:
parent
45097b163a
commit
61d0f893cd
@ -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
|
||||
|
@ -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<nsIMemoryReporterManager> mgr =
|
||||
do_GetService("@mozilla.org/memory-reporter-manager;1");
|
||||
|
||||
nsRefPtr<DoNothingCallback> doNothing = new DoNothingCallback();
|
||||
|
||||
mgr->GetReportsForThisProcess(doNothing, nullptr, /* anonymize = */ false);
|
||||
}
|
||||
|
||||
} // namespace dmd
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // defined(MOZ_DMD)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user