mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 831193 (part 13) - Don't use NS_MEMORY_REPORTER_IMPLEMENT in image/. r=jmuizelaar.
--HG-- extra : rebase_source : 25e1c8dad9905df01eb18f300ddab98b24fde7dc
This commit is contained in:
parent
7b7acd41ea
commit
5023460d68
@ -1,4 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@ -232,20 +233,28 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
// This is used by telemetry.
|
||||
NS_MEMORY_REPORTER_IMPLEMENT(
|
||||
ImagesContentUsedUncompressed,
|
||||
"images-content-used-uncompressed",
|
||||
KIND_OTHER,
|
||||
UNITS_BYTES,
|
||||
imgMemoryReporter::GetImagesContentUsedUncompressed,
|
||||
"This is the sum of the 'explicit/images/content/used/uncompressed-heap' "
|
||||
"and 'explicit/images/content/used/uncompressed-nonheap' numbers. However, "
|
||||
"it is measured at a different time and so may give slightly different "
|
||||
"results.")
|
||||
|
||||
NS_IMPL_ISUPPORTS1(imgMemoryReporter, nsIMemoryMultiReporter)
|
||||
|
||||
// This is used by telemetry.
|
||||
class ImagesContentUsedUncompressedReporter MOZ_FINAL
|
||||
: public MemoryReporterBase
|
||||
{
|
||||
public:
|
||||
ImagesContentUsedUncompressedReporter()
|
||||
: MemoryReporterBase("images-content-used-uncompressed",
|
||||
KIND_OTHER, UNITS_BYTES,
|
||||
"This is the sum of the 'explicit/images/content/used/uncompressed-heap' "
|
||||
"and 'explicit/images/content/used/uncompressed-nonheap' numbers. However, "
|
||||
"it is measured at a different time and so may give slightly different "
|
||||
"results.")
|
||||
{}
|
||||
private:
|
||||
int64_t Amount() MOZ_OVERRIDE
|
||||
{
|
||||
return imgMemoryReporter::GetImagesContentUsedUncompressed();
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS3(nsProgressNotificationProxy,
|
||||
nsIProgressEventSink,
|
||||
nsIChannelEventSink,
|
||||
@ -842,7 +851,7 @@ void imgLoader::GlobalInit()
|
||||
|
||||
sMemReporter = new imgMemoryReporter();
|
||||
NS_RegisterMemoryMultiReporter(sMemReporter);
|
||||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(ImagesContentUsedUncompressed));
|
||||
NS_RegisterMemoryReporter(new ImagesContentUsedUncompressedReporter());
|
||||
}
|
||||
|
||||
nsresult imgLoader::InitCache()
|
||||
|
Loading…
Reference in New Issue
Block a user