Bug 1794536 - Delete MemoryTelemetry::GetUniqueSetSize() and its decleration. r=pbone

Differential Revision: https://phabricator.services.mozilla.com/D160425
This commit is contained in:
Tawah Peggy 2022-11-20 22:04:22 +00:00
Родитель 8317e3892f
Коммит 52f00192d7
2 изменённых файлов: 0 добавлений и 21 удалений

Просмотреть файл

@ -486,25 +486,6 @@ nsresult MemoryTelemetry::FinishGatheringTotalMemory(
return total;
}
void MemoryTelemetry::GetUniqueSetSize(
std::function<void(const int64_t&)>&& aCallback) {
mThreadPool->Dispatch(
NS_NewRunnableFunction(
"MemoryTelemetry::GetUniqueSetSize",
[callback = std::move(aCallback)]() mutable {
RefPtr<nsMemoryReporterManager> mgr =
nsMemoryReporterManager::GetOrCreate();
MOZ_RELEASE_ASSERT(mgr);
int64_t uss = mgr->ResidentUnique();
NS_DispatchToMainThread(NS_NewRunnableFunction(
"MemoryTelemetry::GetUniqueSetSizeResult",
[uss, callback = std::move(callback)]() { callback(uss); }));
}),
NS_DISPATCH_NORMAL);
}
nsresult MemoryTelemetry::Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData) {
if (strcmp(aTopic, kTopicCycleCollectorBegin) == 0) {

Просмотреть файл

@ -39,8 +39,6 @@ class MemoryTelemetry final : public nsIObserver,
nsresult GatherReports(
const std::function<void()>& aCompletionCallback = nullptr);
void GetUniqueSetSize(std::function<void(const int64_t&)>&& aCallback);
/**
* Does expensive initialization, which should happen only after startup has
* completed, and the event loop is idle.