Bug 943660 (part 2) - Remove remnants of Remove nsIMemoryReporter::name.

--HG--
extra : rebase_source : 900bd1c641b26623cccf14d952b5387223b489eb
This commit is contained in:
Nicholas Nethercote 2013-12-03 20:01:24 -08:00
parent d0f3485699
commit b413e441cf
20 changed files with 25 additions and 65 deletions

View File

@ -648,9 +648,7 @@ class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL
: public MemoryMultiReporter
{
public:
nsDOMMemoryFileDataOwnerMemoryReporter()
: MemoryMultiReporter("dom-memory-file-data-owner")
{}
nsDOMMemoryFileDataOwnerMemoryReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCallback,
nsISupports *aClosure)

View File

@ -1133,9 +1133,7 @@ namespace dom {
class MessageManagerReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
MessageManagerReporter()
: MemoryMultiReporter("message-manager")
{}
MessageManagerReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* aCallback,
nsISupports* aData);

View File

@ -99,7 +99,6 @@ WebGLMemoryTracker* WebGLMemoryTracker::UniqueInstance()
}
WebGLMemoryTracker::WebGLMemoryTracker()
: MemoryMultiReporter("webgl")
{
}

View File

@ -1858,7 +1858,6 @@ MediaDecoder::GetOwner()
}
MediaMemoryTracker::MediaMemoryTracker()
: MemoryMultiReporter("media")
{
}

View File

@ -196,9 +196,7 @@ MemoryReportRequestParent::~MemoryReportRequestParent()
class ContentParentsMemoryReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
ContentParentsMemoryReporter()
: MemoryMultiReporter("content-parents")
{}
ContentParentsMemoryReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* cb,
nsISupports* aClosure);

View File

@ -2019,8 +2019,7 @@ class WorkerPrivate::MemoryReporter MOZ_FINAL : public MemoryMultiReporter
public:
MemoryReporter(WorkerPrivate* aWorkerPrivate)
: MemoryMultiReporter("workers"),
mMutex(aWorkerPrivate->mMutex), mWorkerPrivate(aWorkerPrivate),
: mMutex(aWorkerPrivate->mMutex), mWorkerPrivate(aWorkerPrivate),
mAlreadyMappedToAddon(false)
{
aWorkerPrivate->AssertIsOnWorkerThread();

View File

@ -634,9 +634,7 @@ static int64_t gSurfaceMemoryUsed[gfxSurfaceTypeMax] = { 0 };
class SurfaceMemoryReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
SurfaceMemoryReporter()
: MemoryMultiReporter("gfx-surface")
{ }
SurfaceMemoryReporter() { }
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *aCb,
nsISupports *aClosure)

View File

@ -954,9 +954,7 @@ protected:
class MemoryReporter MOZ_FINAL : public mozilla::MemoryMultiReporter
{
public:
MemoryReporter()
: MemoryMultiReporter("font-cache")
{}
MemoryReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* aCb,
nsISupports* aClosure);

View File

@ -74,7 +74,6 @@ gfxFontListPrefObserver::Observe(nsISupports *aSubject,
NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(FontListMallocSizeOf)
gfxPlatformFontList::MemoryReporter::MemoryReporter()
: MemoryMultiReporter("font-list")
{}
NS_IMETHODIMP

View File

@ -229,9 +229,7 @@ class GPUAdapterReporter : public MemoryMultiReporter
}
public:
GPUAdapterReporter()
: MemoryMultiReporter("gpu-adapter")
{}
GPUAdapterReporter() {}
NS_IMETHOD
CollectReports(nsIMemoryReporterCallback* aCb,

View File

@ -53,9 +53,7 @@ NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ImagesMallocSizeOf)
class imgMemoryReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
imgMemoryReporter()
: MemoryMultiReporter("images")
{}
imgMemoryReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback *callback,
nsISupports *closure)

View File

@ -2397,9 +2397,7 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
class JSMainRuntimeCompartmentsReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
JSMainRuntimeCompartmentsReporter()
: MemoryMultiReporter("js-main-runtime-compartments")
{}
JSMainRuntimeCompartmentsReporter() {}
typedef js::Vector<nsCString, 0, js::SystemAllocPolicy> Paths;

View File

@ -226,9 +226,7 @@ Preferences::SizeOfIncludingThisAndOtherStuff(mozilla::MallocSizeOf aMallocSizeO
class PreferenceServiceReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
PreferenceServiceReporter()
: MemoryMultiReporter("preference-service")
{}
PreferenceServiceReporter() {}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* aCallback,
nsISupports* aData);

View File

@ -1075,8 +1075,7 @@ NS_IMPL_ISUPPORTS_INHERITED2(nsCacheService, MemoryMultiReporter,
nsICacheService, nsICacheServiceInternal)
nsCacheService::nsCacheService()
: MemoryMultiReporter("cache-service"),
mObserver(nullptr),
: mObserver(nullptr),
mLock("nsCacheService.mLock"),
mCondVar(mLock, "nsCacheService.mCondVar"),
mTimeStampLock("nsCacheService.mTimeStampLock"),

View File

@ -126,8 +126,7 @@ enum StartupCache::TelemetrifyAge StartupCache::gPostFlushAgeAction = StartupCac
NS_IMPL_ISUPPORTS_INHERITED0(StartupCache, MemoryMultiReporter)
StartupCache::StartupCache()
: MemoryMultiReporter("startup-cache"),
mArchive(nullptr), mStartupWriteInitiated(false), mWriteThread(nullptr)
: mArchive(nullptr), mStartupWriteInitiated(false), mWriteThread(nullptr)
{ }
StartupCache::~StartupCache()

View File

@ -278,8 +278,7 @@ Service::getSynchronousPref()
int32_t Service::sDefaultPageSize = PREF_TS_PAGESIZE_DEFAULT;
Service::Service()
: MemoryMultiReporter("storage-sqlite")
, mMutex("Service::mMutex")
: mMutex("Service::mMutex")
, mSqliteVFS(nullptr)
, mRegistrationMutex("Service::mRegistrationMutex")
, mConnections()

View File

@ -2565,7 +2565,6 @@ nsCycleCollector::CollectReports(nsIHandleReportCallback* aHandleReport,
////////////////////////////////////////////////////////////////////////
nsCycleCollector::nsCycleCollector() :
MemoryMultiReporter("cycle-collector"),
mActivelyCollecting(false),
mScanInProgress(false),
mJSRuntime(nullptr),

View File

@ -500,9 +500,8 @@ namespace mozilla {
// The following base class reduces the amount of boilerplate code required for
// memory uni-reporters. You just need to provide the following.
// - The constant values: nameAndPath (which serves as both the reporters name,
// and the path in its single report), kind, units, and description. They
// are arguments to the MemoryUniReporter constructor.
// - The constant values: path, kind, units, and description. They are
// arguments to the MemoryUniReporter constructor.
// - A private Amount() or public GetAmount() method. It can use the
// MallocSizeOf method if necessary. (There is also
// MallocSizeOfOn{Alloc,Free}, which can be useful.) Use Amount() if the
@ -510,17 +509,17 @@ namespace mozilla {
// provide one or the other, you'll get assertion failures when the memory
// reporter runs.)
//
// The class name of subclasses should match the nameAndPath, minus the
// "explicit" (if present), and with "Reporter" at the end. For example:
// - nameAndPath == "explicit/dom/xyzzy" --> DOMXyzzyReporter
// - nameAndPath == "js-compartments/system" --> JSCompartmentsSystemReporter
// The class name of subclasses should match the path, minus the "explicit" (if
// present), and with "Reporter" at the end. For example:
// - path == "explicit/dom/xyzzy" --> DOMXyzzyReporter
// - path == "js-compartments/system" --> JSCompartmentsSystemReporter
//
class MemoryUniReporter : public nsIMemoryReporter
{
public:
MemoryUniReporter(const char* aNameAndPath, int32_t aKind, int32_t aUnits,
MemoryUniReporter(const char* aPath, int32_t aKind, int32_t aUnits,
const char* aDescription)
: mNameAndPath(aNameAndPath)
: mPath(aPath)
, mKind(aKind)
, mUnits(aUnits)
, mDescription(aDescription)
@ -530,12 +529,6 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD GetName(nsACString& aName)
{
aName.Assign(mNameAndPath);
return NS_OK;
}
NS_IMETHOD CollectReports(nsIMemoryReporterCallback* aCallback,
nsISupports* aData)
{
@ -544,7 +537,7 @@ public:
if (NS_WARN_IF(NS_FAILED(rv)))
return rv;
return aCallback->Callback(EmptyCString(), mNameAndPath, mKind, mUnits,
return aCallback->Callback(EmptyCString(), mPath, mKind, mUnits,
amount, mDescription, aData);
}
@ -566,7 +559,7 @@ protected:
NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(MallocSizeOfOnAlloc)
NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(MallocSizeOfOnFree)
const nsCString mNameAndPath;
const nsCString mPath;
const int32_t mKind;
const int32_t mUnits;
const nsCString mDescription;
@ -587,9 +580,7 @@ protected:
class MemoryMultiReporter : public nsIMemoryReporter
{
public:
MemoryMultiReporter(const char* aName)
: mName(aName)
{}
MemoryMultiReporter() {}
virtual ~MemoryMultiReporter() {}
@ -602,8 +593,6 @@ protected:
NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(MallocSizeOf)
NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(MallocSizeOfOnAlloc)
NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(MallocSizeOfOnFree)
const nsCString mName;
};
} // namespace mozilla

View File

@ -799,9 +799,7 @@ namespace dmd {
class DMDReporter MOZ_FINAL : public MemoryMultiReporter
{
public:
DMDReporter()
: MemoryMultiReporter("dmd")
{}
DMDReporter() {}
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
nsISupports* aData)

View File

@ -175,7 +175,6 @@ NS_IMPL_ISUPPORTS_INHERITED2(
nsObserverService)
nsObserverService::nsObserverService() :
MemoryMultiReporter("observer-service"),
mShuttingDown(false)
{
}