mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj
This commit is contained in:
parent
d3df6f204d
commit
e31b5489da
@ -15,12 +15,10 @@ NS_IMPL_ISUPPORTS0(ArchiveItem)
|
||||
|
||||
ArchiveItem::ArchiveItem()
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveItem);
|
||||
}
|
||||
|
||||
ArchiveItem::~ArchiveItem()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveItem);
|
||||
}
|
||||
|
||||
|
||||
@ -43,7 +41,6 @@ ArchiveItem::SetType(const nsCString& aType)
|
||||
ArchiveReaderEvent::ArchiveReaderEvent(ArchiveReader* aArchiveReader)
|
||||
: mArchiveReader(aArchiveReader)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveReaderEvent);
|
||||
}
|
||||
|
||||
ArchiveReaderEvent::~ArchiveReaderEvent()
|
||||
@ -51,8 +48,6 @@ ArchiveReaderEvent::~ArchiveReaderEvent()
|
||||
if (!NS_IsMainThread()) {
|
||||
NS_ReleaseOnMainThread(mMimeService.forget());
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(ArchiveReaderEvent);
|
||||
}
|
||||
|
||||
// From the filename to the mimetype:
|
||||
|
@ -26,13 +26,11 @@ public:
|
||||
explicit ArchiveRequestEvent(ArchiveRequest* aRequest)
|
||||
: mRequest(aRequest)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveRequestEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~ArchiveRequestEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveRequestEvent);
|
||||
}
|
||||
|
||||
private: //data
|
||||
@ -56,8 +54,6 @@ ArchiveRequest::ArchiveRequest(nsPIDOMWindowInner* aWindow,
|
||||
{
|
||||
MOZ_ASSERT(aReader);
|
||||
|
||||
MOZ_COUNT_CTOR(ArchiveRequest);
|
||||
|
||||
/* An event to make this request asynchronous: */
|
||||
RefPtr<ArchiveRequestEvent> event = new ArchiveRequestEvent(this);
|
||||
NS_DispatchToCurrentThread(event);
|
||||
@ -65,7 +61,6 @@ ArchiveRequest::ArchiveRequest(nsPIDOMWindowInner* aWindow,
|
||||
|
||||
ArchiveRequest::~ArchiveRequest()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveRequest);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -28,12 +28,10 @@ ArchiveZipItem::ArchiveZipItem(const char* aFilename,
|
||||
mCentralStruct(aCentralStruct),
|
||||
mEncoding(aEncoding)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveZipItem);
|
||||
}
|
||||
|
||||
ArchiveZipItem::~ArchiveZipItem()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveZipItem);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -36,8 +36,6 @@ public:
|
||||
mLength(aLength),
|
||||
mStatus(NotStarted)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ArchiveInputStream);
|
||||
|
||||
// Reset the data:
|
||||
memset(&mData, 0, sizeof(mData));
|
||||
|
||||
@ -52,7 +50,6 @@ public:
|
||||
private:
|
||||
virtual ~ArchiveInputStream()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveInputStream);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
mFilename(aName)
|
||||
{
|
||||
MOZ_ASSERT(mBlobImpl);
|
||||
MOZ_COUNT_CTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
ArchiveZipBlobImpl(const nsAString& aName,
|
||||
@ -52,7 +51,6 @@ public:
|
||||
mFilename(aName)
|
||||
{
|
||||
MOZ_ASSERT(mBlobImpl);
|
||||
MOZ_COUNT_CTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
// Overrides:
|
||||
@ -62,7 +60,6 @@ public:
|
||||
protected:
|
||||
virtual ~ArchiveZipBlobImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ArchiveZipBlobImpl);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<BlobImpl>
|
||||
|
@ -360,7 +360,6 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_COUNT_CTOR(ParentRunnable);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -369,7 +368,6 @@ private:
|
||||
MOZ_ASSERT(mState == eFinished);
|
||||
MOZ_ASSERT(!mDirectoryLock);
|
||||
MOZ_ASSERT(mActorDestroyed);
|
||||
MOZ_COUNT_DTOR(ParentRunnable);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -1233,7 +1231,6 @@ public:
|
||||
mOpened(false)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(ChildRunnable);
|
||||
}
|
||||
|
||||
JS::AsmJSCacheResult
|
||||
@ -1282,7 +1279,6 @@ private:
|
||||
MOZ_ASSERT(!mOpened);
|
||||
MOZ_ASSERT(mState == eFinished);
|
||||
MOZ_ASSERT(mActorDestroyed);
|
||||
MOZ_COUNT_DTOR(ChildRunnable);
|
||||
}
|
||||
|
||||
// IPDL methods.
|
||||
|
@ -32,12 +32,10 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Crypto, mParent, mSubtle)
|
||||
|
||||
Crypto::Crypto()
|
||||
{
|
||||
MOZ_COUNT_CTOR(Crypto);
|
||||
}
|
||||
|
||||
Crypto::~Crypto()
|
||||
{
|
||||
MOZ_COUNT_DTOR(Crypto);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -44,12 +44,10 @@ PostMessageEvent::PostMessageEvent(nsGlobalWindow* aSource,
|
||||
mSourceDocument(aSourceDocument),
|
||||
mTrustedCaller(aTrustedCaller)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PostMessageEvent);
|
||||
}
|
||||
|
||||
PostMessageEvent::~PostMessageEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PostMessageEvent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -739,12 +739,10 @@ NS_IMPL_RELEASE_INHERITED(ShadowRootStyleSheetList, StyleSheetList)
|
||||
ShadowRootStyleSheetList::ShadowRootStyleSheetList(ShadowRoot* aShadowRoot)
|
||||
: mShadowRoot(aShadowRoot)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ShadowRootStyleSheetList);
|
||||
}
|
||||
|
||||
ShadowRootStyleSheetList::~ShadowRootStyleSheetList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ShadowRootStyleSheetList);
|
||||
}
|
||||
|
||||
StyleSheet*
|
||||
|
@ -574,12 +574,10 @@ nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy
|
||||
|
||||
nsContentPermissionRequestProxy::nsContentPermissionRequestProxy()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsContentPermissionRequestProxy);
|
||||
}
|
||||
|
||||
nsContentPermissionRequestProxy::~nsContentPermissionRequestProxy()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsContentPermissionRequestProxy);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1218,13 +1218,11 @@ public:
|
||||
explicit SelectorCacheKeyDeleter(SelectorCacheKey* aToDelete)
|
||||
: mSelector(aToDelete)
|
||||
{
|
||||
MOZ_COUNT_CTOR(SelectorCacheKeyDeleter);
|
||||
}
|
||||
|
||||
protected:
|
||||
~SelectorCacheKeyDeleter()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SelectorCacheKeyDeleter);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -6412,7 +6412,6 @@ public:
|
||||
, mStage(eBeforeToggle)
|
||||
, mFullscreen(aFullscreen)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FullscreenTransitionTask);
|
||||
}
|
||||
|
||||
NS_IMETHOD Run() override;
|
||||
@ -6420,7 +6419,6 @@ public:
|
||||
private:
|
||||
~FullscreenTransitionTask() override
|
||||
{
|
||||
MOZ_COUNT_DTOR(FullscreenTransitionTask);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,13 +102,11 @@ nsScriptNameSpaceManager::nsScriptNameSpaceManager()
|
||||
: mGlobalNames(&hash_table_ops, sizeof(GlobalNameMapEntry),
|
||||
GLOBALNAME_HASHTABLE_INITIAL_LENGTH)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsScriptNameSpaceManager);
|
||||
}
|
||||
|
||||
nsScriptNameSpaceManager::~nsScriptNameSpaceManager()
|
||||
{
|
||||
UnregisterWeakMemoryReporter(this);
|
||||
MOZ_COUNT_DTOR(nsScriptNameSpaceManager);
|
||||
}
|
||||
|
||||
nsGlobalNameStruct *
|
||||
|
@ -25,7 +25,6 @@ class ImageData final : public nsISupports
|
||||
{
|
||||
~ImageData()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ImageData);
|
||||
DropData();
|
||||
}
|
||||
|
||||
@ -35,7 +34,6 @@ public:
|
||||
, mHeight(aHeight)
|
||||
, mData(&aData)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ImageData);
|
||||
HoldData();
|
||||
}
|
||||
|
||||
|
@ -333,8 +333,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DistributedContentList)
|
||||
DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
|
||||
: mParent(aHostElement)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DistributedContentList);
|
||||
|
||||
if (aHostElement->IsInsertionPoint()) {
|
||||
if (aHostElement->MatchedNodes().IsEmpty()) {
|
||||
// Fallback content.
|
||||
@ -352,7 +350,6 @@ DistributedContentList::DistributedContentList(HTMLContentElement* aHostElement)
|
||||
|
||||
DistributedContentList::~DistributedContentList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DistributedContentList);
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
|
@ -245,7 +245,6 @@ MemoryReportRequestChild::MemoryReportRequestChild(
|
||||
bool aAnonymize, const MaybeFileDesc& aDMDFile)
|
||||
: mAnonymize(aAnonymize)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MemoryReportRequestChild);
|
||||
if (aDMDFile.type() == MaybeFileDesc::TFileDescriptor) {
|
||||
mDMDFile = aDMDFile.get_FileDescriptor();
|
||||
}
|
||||
@ -253,7 +252,6 @@ MemoryReportRequestChild::MemoryReportRequestChild(
|
||||
|
||||
MemoryReportRequestChild::~MemoryReportRequestChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MemoryReportRequestChild);
|
||||
}
|
||||
|
||||
// IPC sender for remote GC/CC logging.
|
||||
|
@ -1079,8 +1079,6 @@ ProcessHangMonitor::ProcessHangMonitor()
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_CTOR(ProcessHangMonitor);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
obs->AddObserver(this, "xpcom-shutdown", false);
|
||||
@ -1097,8 +1095,6 @@ ProcessHangMonitor::~ProcessHangMonitor()
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_DTOR(ProcessHangMonitor);
|
||||
|
||||
MOZ_ASSERT(sInstance == this);
|
||||
sInstance = nullptr;
|
||||
|
||||
|
@ -30,13 +30,11 @@ public:
|
||||
mPrincipal(aPrincipal),
|
||||
mContentType(aContentType)
|
||||
{
|
||||
MOZ_COUNT_CTOR(BufferMediaResource);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~BufferMediaResource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(BufferMediaResource);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -84,7 +84,6 @@ class MediaStreamTrackSourceGetter : public nsISupports
|
||||
public:
|
||||
MediaStreamTrackSourceGetter()
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaStreamTrackSourceGetter);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<dom::MediaStreamTrackSource>
|
||||
@ -93,7 +92,6 @@ public:
|
||||
protected:
|
||||
virtual ~MediaStreamTrackSourceGetter()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaStreamTrackSourceGetter);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,6 @@ FileBlockCache::FileBlockCache()
|
||||
mIsWriteScheduled(false),
|
||||
mIsOpen(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FileBlockCache);
|
||||
}
|
||||
|
||||
FileBlockCache::~FileBlockCache()
|
||||
@ -57,7 +56,6 @@ FileBlockCache::~FileBlockCache()
|
||||
mFD = nullptr;
|
||||
}
|
||||
}
|
||||
MOZ_COUNT_DTOR(FileBlockCache);
|
||||
}
|
||||
|
||||
|
||||
|
@ -417,7 +417,6 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
||||
, INIT_CANONICAL(mIsVisible, !aOwner->IsHidden())
|
||||
, mTelemetryReported(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaDecoder);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MediaMemoryTracker::AddMediaDecoder(this);
|
||||
|
||||
@ -516,7 +515,6 @@ MediaDecoder::~MediaDecoder()
|
||||
mResourceCallback->Disconnect();
|
||||
MediaMemoryTracker::RemoveMediaDecoder(this);
|
||||
UnpinForSeek();
|
||||
MOZ_COUNT_DTOR(MediaDecoder);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -424,7 +424,6 @@ public:
|
||||
, mSelectedVideoTrackID(TRACK_NONE)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(MediaRecorder::Session);
|
||||
|
||||
uint32_t maxMem = Preferences::GetUint("media.recorder.max_memory",
|
||||
MAX_ALLOW_MEMORY_BUFFER);
|
||||
@ -589,7 +588,6 @@ private:
|
||||
// Only DestroyRunnable is allowed to delete Session object.
|
||||
virtual ~Session()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaRecorder::Session);
|
||||
LOG(LogLevel::Debug, ("Session.~Session (%p)", this));
|
||||
CleanupStreams();
|
||||
if (mReadThread) {
|
||||
|
@ -410,13 +410,11 @@ protected:
|
||||
mContentType(aContentType),
|
||||
mLoadInBackground(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(BaseMediaResource);
|
||||
NS_ASSERTION(!mContentType.IsEmpty(), "Must know content type");
|
||||
mURI->GetSpec(mContentURL);
|
||||
}
|
||||
virtual ~BaseMediaResource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(BaseMediaResource);
|
||||
}
|
||||
|
||||
const nsCString& GetContentType() const override
|
||||
|
@ -23,13 +23,11 @@ MediaShutdownManager::MediaShutdownManager()
|
||||
, mIsDoingXPCOMShutDown(false)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(MediaShutdownManager);
|
||||
}
|
||||
|
||||
MediaShutdownManager::~MediaShutdownManager()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_DTOR(MediaShutdownManager);
|
||||
}
|
||||
|
||||
// Note that we don't use ClearOnShutdown() on this StaticRefPtr, as that
|
||||
|
@ -66,7 +66,6 @@ public:
|
||||
mLabel(aLabel),
|
||||
mStopped(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MediaStreamTrackSource);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,7 +165,6 @@ public:
|
||||
protected:
|
||||
virtual ~MediaStreamTrackSource()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MediaStreamTrackSource);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,13 +53,9 @@ DirectShowDecoder::IsEnabled()
|
||||
DirectShowDecoder::DirectShowDecoder(MediaDecoderOwner* aOwner)
|
||||
: MediaDecoder(aOwner)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DirectShowDecoder);
|
||||
}
|
||||
|
||||
DirectShowDecoder::~DirectShowDecoder()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DirectShowDecoder);
|
||||
}
|
||||
DirectShowDecoder::~DirectShowDecoder() = default;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -166,7 +166,6 @@ SourceBufferResource::Ended()
|
||||
SourceBufferResource::~SourceBufferResource()
|
||||
{
|
||||
SBR_DEBUG("");
|
||||
MOZ_COUNT_DTOR(SourceBufferResource);
|
||||
}
|
||||
|
||||
SourceBufferResource::SourceBufferResource(const nsACString& aType)
|
||||
@ -177,7 +176,6 @@ SourceBufferResource::SourceBufferResource(const nsACString& aType)
|
||||
, mEnded(false)
|
||||
{
|
||||
SBR_DEBUG("");
|
||||
MOZ_COUNT_CTOR(SourceBufferResource);
|
||||
}
|
||||
|
||||
#undef SBR_DEBUG
|
||||
|
@ -1075,15 +1075,12 @@ CamerasParent::CamerasParent()
|
||||
return NS_OK;
|
||||
});
|
||||
NS_DispatchToMainThread(threadStart);
|
||||
|
||||
MOZ_COUNT_CTOR(CamerasParent);
|
||||
}
|
||||
|
||||
CamerasParent::~CamerasParent()
|
||||
{
|
||||
LOG(("~CamerasParent: %p", this));
|
||||
|
||||
MOZ_COUNT_DTOR(CamerasParent);
|
||||
#ifdef DEBUG
|
||||
// Verify we have shut down the webrtc engines, this is
|
||||
// supposed to happen in ActorDestroy.
|
||||
|
@ -19,13 +19,11 @@ BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHel
|
||||
, mCrashHelper(aCrashHelper)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(BufferDecoder);
|
||||
}
|
||||
|
||||
BufferDecoder::~BufferDecoder()
|
||||
{
|
||||
// The dtor may run on any thread, we cannot be sure.
|
||||
MOZ_COUNT_DTOR(BufferDecoder);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -29,12 +29,10 @@ RTCIdentityProviderRegistrar::RTCIdentityProviderRegistrar(
|
||||
, mGenerateAssertionCallback(nullptr)
|
||||
, mValidateAssertionCallback(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(RTCIdentityProviderRegistrar);
|
||||
}
|
||||
|
||||
RTCIdentityProviderRegistrar::~RTCIdentityProviderRegistrar()
|
||||
{
|
||||
MOZ_COUNT_DTOR(RTCIdentityProviderRegistrar);
|
||||
}
|
||||
|
||||
nsIGlobalObject*
|
||||
|
@ -110,13 +110,10 @@ NS_IMPL_ISUPPORTS(PresentationBuilderParent,
|
||||
PresentationBuilderParent::PresentationBuilderParent(PresentationParent* aParent)
|
||||
: mParent(aParent)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationBuilderParent);
|
||||
}
|
||||
|
||||
PresentationBuilderParent::~PresentationBuilderParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationBuilderParent);
|
||||
|
||||
if (mNeedDestroyActor) {
|
||||
Unused << NS_WARN_IF(!Send__delete__(this));
|
||||
}
|
||||
|
@ -93,12 +93,10 @@ NS_IMPL_ISUPPORTS(PresentationParent,
|
||||
|
||||
PresentationParent::PresentationParent()
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationParent);
|
||||
}
|
||||
|
||||
/* virtual */ PresentationParent::~PresentationParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationParent);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -388,12 +386,10 @@ PresentationRequestParent::PresentationRequestParent(nsIPresentationService* aSe
|
||||
: mService(aService)
|
||||
, mChildId(aContentParentId)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PresentationRequestParent);
|
||||
}
|
||||
|
||||
PresentationRequestParent::~PresentationRequestParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PresentationRequestParent);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -161,7 +161,6 @@ public:
|
||||
explicit nsAnonymousContentList(nsIContent* aParent)
|
||||
: mParent(aParent)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsAnonymousContentList);
|
||||
}
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
@ -183,7 +182,6 @@ public:
|
||||
private:
|
||||
virtual ~nsAnonymousContentList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsAnonymousContentList);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> mParent;
|
||||
|
@ -102,7 +102,6 @@ nsXULTemplateBuilder::nsXULTemplateBuilder(void)
|
||||
mTop(nullptr),
|
||||
mObservedDocument(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsXULTemplateBuilder);
|
||||
}
|
||||
|
||||
void
|
||||
@ -132,8 +131,6 @@ nsXULTemplateBuilder::~nsXULTemplateBuilder(void)
|
||||
NS_IF_RELEASE(gScriptSecurityManager);
|
||||
NS_IF_RELEASE(gObserverService);
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(nsXULTemplateBuilder);
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,12 +12,10 @@
|
||||
|
||||
nsWebBrowserContentPolicy::nsWebBrowserContentPolicy()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsWebBrowserContentPolicy);
|
||||
}
|
||||
|
||||
nsWebBrowserContentPolicy::~nsWebBrowserContentPolicy()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsWebBrowserContentPolicy);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsWebBrowserContentPolicy, nsIContentPolicy)
|
||||
|
@ -24,12 +24,10 @@ NS_IMPL_ISUPPORTS(MockWebBrowserPrint, nsIWebBrowserPrint);
|
||||
MockWebBrowserPrint::MockWebBrowserPrint(const PrintData &aData)
|
||||
: mData(aData)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MockWebBrowserPrint);
|
||||
}
|
||||
|
||||
MockWebBrowserPrint::~MockWebBrowserPrint()
|
||||
{
|
||||
MOZ_COUNT_DTOR(MockWebBrowserPrint);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -22,7 +22,6 @@ PrintProgressDialogChild::PrintProgressDialogChild(
|
||||
nsIObserver* aOpenObserver) :
|
||||
mOpenObserver(aOpenObserver)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintProgressDialogChild);
|
||||
}
|
||||
|
||||
PrintProgressDialogChild::~PrintProgressDialogChild()
|
||||
@ -32,7 +31,6 @@ PrintProgressDialogChild::~PrintProgressDialogChild()
|
||||
// the parent to decrement its refcount, as well as prevent it from attempting
|
||||
// to contact us further.
|
||||
Unused << Send__delete__(this);
|
||||
MOZ_COUNT_DTOR(PrintProgressDialogChild);
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
|
@ -17,12 +17,10 @@ NS_IMPL_ISUPPORTS(PrintProgressDialogParent, nsIObserver)
|
||||
PrintProgressDialogParent::PrintProgressDialogParent() :
|
||||
mActive(true)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintProgressDialogParent);
|
||||
}
|
||||
|
||||
PrintProgressDialogParent::~PrintProgressDialogParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PrintProgressDialogParent);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -308,8 +308,6 @@ PrintingParent::SerializeAndEnsureRemotePrintJob(
|
||||
|
||||
PrintingParent::PrintingParent()
|
||||
{
|
||||
MOZ_COUNT_CTOR(PrintingParent);
|
||||
|
||||
mPrintSettingsSvc =
|
||||
do_GetService("@mozilla.org/gfx/printsettings-service;1");
|
||||
MOZ_ASSERT(mPrintSettingsSvc);
|
||||
@ -317,7 +315,6 @@ PrintingParent::PrintingParent()
|
||||
|
||||
PrintingParent::~PrintingParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PrintingParent);
|
||||
}
|
||||
|
||||
} // namespace embedding
|
||||
|
@ -214,12 +214,10 @@ Layer::Layer(LayerManager* aManager, void* aImplData) :
|
||||
#endif
|
||||
mAnimationGeneration(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(Layer);
|
||||
}
|
||||
|
||||
Layer::~Layer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(Layer);
|
||||
}
|
||||
|
||||
Animation*
|
||||
@ -1122,13 +1120,11 @@ ContainerLayer::ContainerLayer(LayerManager* aManager, void* aImplData)
|
||||
mChildrenChanged(false),
|
||||
mEventRegionsOverride(EventRegionsOverride::NoOverride)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ContainerLayer);
|
||||
mContentFlags = 0; // Clear NO_TEXT, NO_TEXT_OVER_TRANSPARENT
|
||||
}
|
||||
|
||||
ContainerLayer::~ContainerLayer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ContainerLayer);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -28,12 +28,10 @@ CompositableChild::CompositableChild()
|
||||
mAsyncID(0),
|
||||
mCanSend(true)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CompositableChild);
|
||||
}
|
||||
|
||||
CompositableChild::~CompositableChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CompositableChild);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -57,12 +57,10 @@ CompositableClient::CompositableClient(CompositableForwarder* aForwarder,
|
||||
: mForwarder(aForwarder)
|
||||
, mTextureFlags(aTextureFlags)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CompositableClient);
|
||||
}
|
||||
|
||||
CompositableClient::~CompositableClient()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CompositableClient);
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,12 @@ CompositorThreadHolder::CompositorThreadHolder()
|
||||
: mCompositorThread(CreateCompositorThread())
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_CTOR(CompositorThreadHolder);
|
||||
}
|
||||
|
||||
CompositorThreadHolder::~CompositorThreadHolder()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
MOZ_COUNT_DTOR(CompositorThreadHolder);
|
||||
|
||||
DestroyCompositorThread(mCompositorThread);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ using mozilla::services::GetObserverService;
|
||||
class nsFontCache final : public nsIObserver
|
||||
{
|
||||
public:
|
||||
nsFontCache() { MOZ_COUNT_CTOR(nsFontCache); }
|
||||
nsFontCache() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
@ -62,7 +62,7 @@ public:
|
||||
void Flush();
|
||||
|
||||
protected:
|
||||
~nsFontCache() { MOZ_COUNT_DTOR(nsFontCache); }
|
||||
~nsFontCache() {}
|
||||
|
||||
nsDeviceContext* mContext; // owner
|
||||
nsCOMPtr<nsIAtom> mLocaleLanguage;
|
||||
|
@ -76,8 +76,6 @@ gfxContext::gfxContext(DrawTarget *aTarget, const Point& aDeviceOffset)
|
||||
gfxCriticalError() << "Don't create a gfxContext without a DrawTarget";
|
||||
}
|
||||
|
||||
MOZ_COUNT_CTOR(gfxContext);
|
||||
|
||||
mStateStack.SetLength(1);
|
||||
CurrentState().drawTarget = mDT;
|
||||
CurrentState().deviceOffset = aDeviceOffset;
|
||||
@ -119,7 +117,6 @@ gfxContext::~gfxContext()
|
||||
}
|
||||
}
|
||||
mDT->Flush();
|
||||
MOZ_COUNT_DTOR(gfxContext);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -154,7 +154,6 @@ gfxTextRun::gfxTextRun(const gfxTextRunFactory::Parameters *aParams,
|
||||
, mShapingState(eShapingState_Normal)
|
||||
{
|
||||
NS_ASSERTION(mAppUnitsPerDevUnit > 0, "Invalid app unit scale");
|
||||
MOZ_COUNT_CTOR(gfxTextRun);
|
||||
NS_ADDREF(mFontGroup);
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
@ -199,8 +198,6 @@ gfxTextRun::~gfxTextRun()
|
||||
#endif
|
||||
NS_RELEASE(mFontGroup);
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(gfxTextRun);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -47,7 +47,6 @@ VRManagerChild::VRManagerChild()
|
||||
, mFrameRequestCallbackCounter(0)
|
||||
, mBackend(layers::LayersBackend::LAYERS_NONE)
|
||||
{
|
||||
MOZ_COUNT_CTOR(VRManagerChild);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
mStartTimeStamp = TimeStamp::Now();
|
||||
@ -56,7 +55,6 @@ VRManagerChild::VRManagerChild()
|
||||
VRManagerChild::~VRManagerChild()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_COUNT_DTOR(VRManagerChild);
|
||||
}
|
||||
|
||||
/*static*/ void
|
||||
|
@ -383,13 +383,11 @@ public:
|
||||
explicit nsResizeDropdownAtFinalPosition(nsComboboxControlFrame* aFrame)
|
||||
: mFrame(aFrame)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsResizeDropdownAtFinalPosition);
|
||||
}
|
||||
|
||||
protected:
|
||||
~nsResizeDropdownAtFinalPosition()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsResizeDropdownAtFinalPosition);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -606,7 +606,6 @@ public:
|
||||
nsGlyphTableList()
|
||||
: mUnicodeTable(NS_LITERAL_STRING("Unicode"))
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsGlyphTableList);
|
||||
}
|
||||
|
||||
nsresult Initialize();
|
||||
@ -623,7 +622,6 @@ public:
|
||||
private:
|
||||
~nsGlyphTableList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsGlyphTableList);
|
||||
}
|
||||
|
||||
nsPropertiesTable* PropertiesTableAt(int32_t aIndex) {
|
||||
|
@ -18,7 +18,6 @@ NS_IMPL_ISUPPORTS(RemotePrintJobChild,
|
||||
|
||||
RemotePrintJobChild::RemotePrintJobChild()
|
||||
{
|
||||
MOZ_COUNT_CTOR(RemotePrintJobChild);
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -141,7 +140,6 @@ RemotePrintJobChild::OnSecurityChange(nsIWebProgress* aProgress,
|
||||
|
||||
RemotePrintJobChild::~RemotePrintJobChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(RemotePrintJobChild);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -109,13 +109,10 @@ FontFace::FontFace(nsISupports* aParent, FontFaceSet* aFontFaceSet)
|
||||
, mFontFaceSet(aFontFaceSet)
|
||||
, mInFontFaceSet(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFace);
|
||||
}
|
||||
|
||||
FontFace::~FontFace()
|
||||
{
|
||||
MOZ_COUNT_DTOR(FontFace);
|
||||
|
||||
SetUserFontEntry(nullptr);
|
||||
|
||||
if (mSourceBuffer) {
|
||||
|
@ -104,8 +104,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
||||
, mHasLoadingFontFacesIsDirty(false)
|
||||
, mDelayedLoadCheck(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFaceSet);
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aWindow);
|
||||
|
||||
// If the pref is not set, don't create the Promise (which the page wouldn't
|
||||
@ -127,8 +125,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
||||
|
||||
FontFaceSet::~FontFaceSet()
|
||||
{
|
||||
MOZ_COUNT_DTOR(FontFaceSet);
|
||||
|
||||
Disconnect();
|
||||
for (auto it = mLoaders.Iter(); !it.Done(); it.Next()) {
|
||||
it.Get()->GetKey()->Cancel();
|
||||
|
@ -1130,14 +1130,11 @@ protected:
|
||||
DOMCSSDeclarationImpl::DOMCSSDeclarationImpl(css::StyleRule *aRule)
|
||||
: mRule(aRule)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DOMCSSDeclarationImpl);
|
||||
}
|
||||
|
||||
DOMCSSDeclarationImpl::~DOMCSSDeclarationImpl(void)
|
||||
{
|
||||
NS_ASSERTION(!mRule, "DropReference not called.");
|
||||
|
||||
MOZ_COUNT_DTOR(DOMCSSDeclarationImpl);
|
||||
}
|
||||
|
||||
inline css::DOMCSSStyleRule* DOMCSSDeclarationImpl::DomRule()
|
||||
|
@ -2405,7 +2405,6 @@ nsCSSValueList_heap::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) co
|
||||
|
||||
nsCSSValueSharedList::~nsCSSValueSharedList()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsCSSValueSharedList);
|
||||
if (mHead) {
|
||||
NS_CSS_DELETE_LIST_MEMBER(nsCSSValueList, mHead, mNext);
|
||||
delete mHead;
|
||||
@ -3061,14 +3060,10 @@ nsCSSValueTokenStream::nsCSSValueTokenStream()
|
||||
: mPropertyID(eCSSProperty_UNKNOWN)
|
||||
, mShorthandPropertyID(eCSSProperty_UNKNOWN)
|
||||
, mLevel(SheetType::Count)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSValueTokenStream);
|
||||
}
|
||||
{}
|
||||
|
||||
nsCSSValueTokenStream::~nsCSSValueTokenStream()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsCSSValueTokenStream);
|
||||
}
|
||||
{}
|
||||
|
||||
size_t
|
||||
nsCSSValueTokenStream::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
|
||||
|
@ -299,35 +299,25 @@ class FontFamilyListRefCnt final : public FontFamilyList {
|
||||
public:
|
||||
FontFamilyListRefCnt()
|
||||
: FontFamilyList()
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFamilyListRefCnt);
|
||||
}
|
||||
{}
|
||||
|
||||
explicit FontFamilyListRefCnt(FontFamilyType aGenericType)
|
||||
: FontFamilyList(aGenericType)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFamilyListRefCnt);
|
||||
}
|
||||
{}
|
||||
|
||||
FontFamilyListRefCnt(const nsAString& aFamilyName,
|
||||
QuotedName aQuoted)
|
||||
: FontFamilyList(aFamilyName, aQuoted)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFamilyListRefCnt);
|
||||
}
|
||||
{}
|
||||
|
||||
FontFamilyListRefCnt(const FontFamilyListRefCnt& aOther)
|
||||
: FontFamilyList(aOther)
|
||||
{
|
||||
MOZ_COUNT_CTOR(FontFamilyListRefCnt);
|
||||
}
|
||||
{}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(FontFamilyListRefCnt);
|
||||
|
||||
private:
|
||||
~FontFamilyListRefCnt() {
|
||||
MOZ_COUNT_DTOR(FontFamilyListRefCnt);
|
||||
}
|
||||
~FontFamilyListRefCnt() {}
|
||||
};
|
||||
|
||||
struct RGBAColorData
|
||||
@ -1120,7 +1110,6 @@ private:
|
||||
: mRefCnt(0)
|
||||
, mCount(aItemCount)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSValue::Array);
|
||||
CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
|
||||
new (val) nsCSSValue();
|
||||
}
|
||||
@ -1128,7 +1117,6 @@ private:
|
||||
|
||||
~Array()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsCSSValue::Array);
|
||||
CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
|
||||
val->~nsCSSValue();
|
||||
}
|
||||
@ -1198,14 +1186,12 @@ struct nsCSSValueSharedList final {
|
||||
nsCSSValueSharedList()
|
||||
: mHead(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSValueSharedList);
|
||||
}
|
||||
|
||||
// Takes ownership of aList.
|
||||
explicit nsCSSValueSharedList(nsCSSValueList* aList)
|
||||
: mHead(aList)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSValueSharedList);
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1842,16 +1828,12 @@ public:
|
||||
, mComponent2(aComponent2)
|
||||
, mComponent3(aComponent3)
|
||||
, mAlpha(aAlpha)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSValueFloatColor);
|
||||
}
|
||||
{}
|
||||
|
||||
private:
|
||||
// Private destructor, to discourage deletion outside of Release():
|
||||
~nsCSSValueFloatColor()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsCSSValueFloatColor);
|
||||
}
|
||||
{}
|
||||
|
||||
public:
|
||||
bool operator==(nsCSSValueFloatColor& aOther) const;
|
||||
|
@ -28,14 +28,11 @@ nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElemen
|
||||
: mElement(aElement)
|
||||
, mIsSMILOverride(aIsSMILOverride)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration);
|
||||
|
||||
NS_ASSERTION(aElement, "Inline style for a NULL element?");
|
||||
}
|
||||
|
||||
nsDOMCSSAttributeDeclaration::~nsDOMCSSAttributeDeclaration()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsDOMCSSAttributeDeclaration);
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsDOMCSSAttributeDeclaration, mElement)
|
||||
|
@ -98,9 +98,7 @@ nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
||||
, mFrameRefCnt(0)
|
||||
, mComputingStruct(nsStyleStructID_None)
|
||||
#endif
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsStyleContext);
|
||||
}
|
||||
{}
|
||||
|
||||
nsStyleContext::nsStyleContext(nsStyleContext* aParent,
|
||||
nsIAtom* aPseudoTag,
|
||||
@ -183,7 +181,6 @@ nsStyleContext::FinishConstruction(bool aSkipParentDisplayBasedStyleFixup)
|
||||
|
||||
nsStyleContext::~nsStyleContext()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsStyleContext);
|
||||
NS_ASSERTION((nullptr == mChild) && (nullptr == mEmptyChild), "destructing context with children");
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -1141,7 +1141,6 @@ public:
|
||||
explicit nsCSSShadowArray(uint32_t aArrayLen) :
|
||||
mLength(aArrayLen)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsCSSShadowArray);
|
||||
for (uint32_t i = 1; i < mLength; ++i) {
|
||||
// Make sure we call the constructors of each nsCSSShadowItem
|
||||
// (the first one is called for us because we declared it under private)
|
||||
@ -1152,7 +1151,6 @@ public:
|
||||
private:
|
||||
// Private destructor, to discourage deletion outside of Release():
|
||||
~nsCSSShadowArray() {
|
||||
MOZ_COUNT_DTOR(nsCSSShadowArray);
|
||||
for (uint32_t i = 1; i < mLength; ++i) {
|
||||
mArray[i].~nsCSSShadowItem();
|
||||
}
|
||||
|
@ -170,7 +170,6 @@ nsZipHandle::nsZipHandle()
|
||||
, mFileStart(nullptr)
|
||||
, mTotalLen(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsZipHandle);
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsZipHandle)
|
||||
@ -344,7 +343,6 @@ nsZipHandle::~nsZipHandle()
|
||||
mFileData = nullptr;
|
||||
mMap = nullptr;
|
||||
mBuf = nullptr;
|
||||
MOZ_COUNT_DTOR(nsZipHandle);
|
||||
}
|
||||
|
||||
//***********************************************************
|
||||
@ -956,8 +954,6 @@ nsZipArchive::nsZipArchive()
|
||||
{
|
||||
zipLog.AddRef();
|
||||
|
||||
MOZ_COUNT_CTOR(nsZipArchive);
|
||||
|
||||
// initialize the table to nullptr
|
||||
memset(mFiles, 0, sizeof(mFiles));
|
||||
}
|
||||
@ -969,8 +965,6 @@ nsZipArchive::~nsZipArchive()
|
||||
{
|
||||
CloseArchive();
|
||||
|
||||
MOZ_COUNT_DTOR(nsZipArchive);
|
||||
|
||||
zipLog.Release();
|
||||
}
|
||||
|
||||
|
@ -264,13 +264,11 @@ nsUDPSocket::nsUDPSocket()
|
||||
}
|
||||
|
||||
mSts = gSocketTransportService;
|
||||
MOZ_COUNT_CTOR(nsUDPSocket);
|
||||
}
|
||||
|
||||
nsUDPSocket::~nsUDPSocket()
|
||||
{
|
||||
CloseSocket();
|
||||
MOZ_COUNT_DTOR(nsUDPSocket);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -28,13 +28,11 @@ AppCacheStorage::AppCacheStorage(nsILoadContextInfo* aInfo,
|
||||
: CacheStorage(aInfo, true /* disk */, false /* lookup app cache */, false /* skip size check */, false /* pin */)
|
||||
, mAppCache(aAppCache)
|
||||
{
|
||||
MOZ_COUNT_CTOR(AppCacheStorage);
|
||||
}
|
||||
|
||||
AppCacheStorage::~AppCacheStorage()
|
||||
{
|
||||
ProxyReleaseMainThread(mAppCache);
|
||||
MOZ_COUNT_DTOR(AppCacheStorage);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP AppCacheStorage::AsyncOpenURI(nsIURI *aURI,
|
||||
|
@ -48,8 +48,6 @@ NS_IMPL_ISUPPORTS(CacheEntryHandle, nsICacheEntry)
|
||||
CacheEntryHandle::CacheEntryHandle(CacheEntry* aEntry)
|
||||
: mEntry(aEntry)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CacheEntryHandle);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!mEntry->HandlesCount()) {
|
||||
// CacheEntry.mHandlesCount must go from zero to one only under
|
||||
@ -68,8 +66,6 @@ CacheEntryHandle::~CacheEntryHandle()
|
||||
{
|
||||
mEntry->ReleaseHandleRef();
|
||||
mEntry->OnHandleClosed(this);
|
||||
|
||||
MOZ_COUNT_DTOR(CacheEntryHandle);
|
||||
}
|
||||
|
||||
// CacheEntry::Callback
|
||||
@ -1864,12 +1860,10 @@ void CacheEntry::StoreFrecency(double aFrecency)
|
||||
CacheOutputCloseListener::CacheOutputCloseListener(CacheEntry* aEntry)
|
||||
: mEntry(aEntry)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CacheOutputCloseListener);
|
||||
}
|
||||
|
||||
CacheOutputCloseListener::~CacheOutputCloseListener()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CacheOutputCloseListener);
|
||||
}
|
||||
|
||||
void CacheOutputCloseListener::OnOutputClosed()
|
||||
|
@ -39,7 +39,6 @@ public:
|
||||
{
|
||||
LOG(("NotifyCacheFileListenerEvent::NotifyCacheFileListenerEvent() "
|
||||
"[this=%p]", this));
|
||||
MOZ_COUNT_CTOR(NotifyCacheFileListenerEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -47,7 +46,6 @@ protected:
|
||||
{
|
||||
LOG(("NotifyCacheFileListenerEvent::~NotifyCacheFileListenerEvent() "
|
||||
"[this=%p]", this));
|
||||
MOZ_COUNT_DTOR(NotifyCacheFileListenerEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -78,7 +76,6 @@ public:
|
||||
{
|
||||
LOG(("NotifyChunkListenerEvent::NotifyChunkListenerEvent() [this=%p]",
|
||||
this));
|
||||
MOZ_COUNT_CTOR(NotifyChunkListenerEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -86,7 +83,6 @@ protected:
|
||||
{
|
||||
LOG(("NotifyChunkListenerEvent::~NotifyChunkListenerEvent() [this=%p]",
|
||||
this));
|
||||
MOZ_COUNT_DTOR(NotifyChunkListenerEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -114,7 +110,6 @@ public:
|
||||
explicit DoomFileHelper(CacheFileListener *aListener)
|
||||
: mListener(aListener)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomFileHelper);
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +154,6 @@ public:
|
||||
private:
|
||||
virtual ~DoomFileHelper()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DoomFileHelper);
|
||||
}
|
||||
|
||||
nsCOMPtr<CacheFileListener> mListener;
|
||||
|
@ -251,7 +251,6 @@ public:
|
||||
{
|
||||
LOG(("NotifyUpdateListenerEvent::NotifyUpdateListenerEvent() [this=%p]",
|
||||
this));
|
||||
MOZ_COUNT_CTOR(NotifyUpdateListenerEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -259,7 +258,6 @@ protected:
|
||||
{
|
||||
LOG(("NotifyUpdateListenerEvent::~NotifyUpdateListenerEvent() [this=%p]",
|
||||
this));
|
||||
MOZ_COUNT_DTOR(NotifyUpdateListenerEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -347,15 +345,12 @@ CacheFileChunk::CacheFileChunk(CacheFile *aFile, uint32_t aIndex,
|
||||
{
|
||||
LOG(("CacheFileChunk::CacheFileChunk() [this=%p, index=%u, initByWriter=%d]",
|
||||
this, aIndex, aInitByWriter));
|
||||
MOZ_COUNT_CTOR(CacheFileChunk);
|
||||
|
||||
mBuf = new CacheFileChunkBuffer(this);
|
||||
}
|
||||
|
||||
CacheFileChunk::~CacheFileChunk()
|
||||
{
|
||||
LOG(("CacheFileChunk::~CacheFileChunk() [this=%p]", this));
|
||||
MOZ_COUNT_DTOR(CacheFileChunk);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -545,13 +545,11 @@ public:
|
||||
: mMonitor("ShutdownEvent.mMonitor")
|
||||
, mNotified(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ShutdownEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~ShutdownEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ShutdownEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -601,14 +599,12 @@ public:
|
||||
, mCallback(aCallback)
|
||||
, mKey(aKey)
|
||||
{
|
||||
MOZ_COUNT_CTOR(OpenFileEvent);
|
||||
mIOMan = CacheFileIOManager::gInstance;
|
||||
}
|
||||
|
||||
protected:
|
||||
~OpenFileEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(OpenFileEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -663,13 +659,11 @@ public:
|
||||
, mCount(aCount)
|
||||
, mCallback(aCallback)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ReadEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~ReadEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ReadEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -709,14 +703,11 @@ public:
|
||||
, mTruncate(aTruncate)
|
||||
, mCallback(aCallback)
|
||||
{
|
||||
MOZ_COUNT_CTOR(WriteEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~WriteEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(WriteEvent);
|
||||
|
||||
if (!mCallback && mBuf) {
|
||||
free(const_cast<char *>(mBuf));
|
||||
}
|
||||
@ -770,13 +761,11 @@ public:
|
||||
: mCallback(aCallback)
|
||||
, mHandle(aHandle)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomFileEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~DoomFileEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DoomFileEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -809,8 +798,6 @@ public:
|
||||
CacheFileIOListener *aCallback)
|
||||
: mCallback(aCallback)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomFileByKeyEvent);
|
||||
|
||||
SHA1Sum sum;
|
||||
sum.update(aKey.BeginReading(), aKey.Length());
|
||||
sum.finish(mHash);
|
||||
@ -821,7 +808,6 @@ public:
|
||||
protected:
|
||||
~DoomFileByKeyEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DoomFileByKeyEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -854,13 +840,11 @@ public:
|
||||
explicit ReleaseNSPRHandleEvent(CacheFileHandle *aHandle)
|
||||
: mHandle(aHandle)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ReleaseNSPRHandleEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~ReleaseNSPRHandleEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ReleaseNSPRHandleEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -886,13 +870,11 @@ public:
|
||||
, mEOFPos(aEOFPos)
|
||||
, mCallback(aCallback)
|
||||
{
|
||||
MOZ_COUNT_CTOR(TruncateSeekSetEOFEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~TruncateSeekSetEOFEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(TruncateSeekSetEOFEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -929,13 +911,11 @@ public:
|
||||
, mNewName(aNewName)
|
||||
, mCallback(aCallback)
|
||||
{
|
||||
MOZ_COUNT_CTOR(RenameFileEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~RenameFileEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(RenameFileEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -973,13 +953,11 @@ public:
|
||||
, mAnonymous(aAnonymous)
|
||||
, mPinning(aPinning)
|
||||
{
|
||||
MOZ_COUNT_CTOR(InitIndexEntryEvent);
|
||||
}
|
||||
|
||||
protected:
|
||||
~InitIndexEntryEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(InitIndexEntryEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -1017,7 +995,6 @@ public:
|
||||
, mHasFrecency(false)
|
||||
, mHasExpirationTime(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(UpdateIndexEntryEvent);
|
||||
if (aFrecency) {
|
||||
mHasFrecency = true;
|
||||
mFrecency = *aFrecency;
|
||||
@ -1031,7 +1008,6 @@ public:
|
||||
protected:
|
||||
~UpdateIndexEntryEvent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(UpdateIndexEntryEvent);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -1114,14 +1090,12 @@ CacheFileIOManager::CacheFileIOManager()
|
||||
, mRemovingTrashDirs(false)
|
||||
{
|
||||
LOG(("CacheFileIOManager::CacheFileIOManager [this=%p]", this));
|
||||
MOZ_COUNT_CTOR(CacheFileIOManager);
|
||||
MOZ_ASSERT(!gInstance, "multiple CacheFileIOManager instances!");
|
||||
}
|
||||
|
||||
CacheFileIOManager::~CacheFileIOManager()
|
||||
{
|
||||
LOG(("CacheFileIOManager::~CacheFileIOManager [this=%p]", this));
|
||||
MOZ_COUNT_DTOR(CacheFileIOManager);
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -57,7 +57,6 @@ CacheFileInputStream::CacheFileInputStream(CacheFile *aFile,
|
||||
, mCacheEntryHandle(aEntry)
|
||||
{
|
||||
LOG(("CacheFileInputStream::CacheFileInputStream() [this=%p]", this));
|
||||
MOZ_COUNT_CTOR(CacheFileInputStream);
|
||||
|
||||
if (mAlternativeData) {
|
||||
mPos = mFile->mAltDataOffset;
|
||||
@ -67,7 +66,6 @@ CacheFileInputStream::CacheFileInputStream(CacheFile *aFile,
|
||||
CacheFileInputStream::~CacheFileInputStream()
|
||||
{
|
||||
LOG(("CacheFileInputStream::~CacheFileInputStream() [this=%p]", this));
|
||||
MOZ_COUNT_DTOR(CacheFileInputStream);
|
||||
MOZ_ASSERT(!mInReadSegments);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,6 @@ CacheFileMetadata::CacheFileMetadata(CacheFileHandle *aHandle, const nsACString
|
||||
LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p, handle=%p, key=%s]",
|
||||
this, aHandle, PromiseFlatCString(aKey).get()));
|
||||
|
||||
MOZ_COUNT_CTOR(CacheFileMetadata);
|
||||
memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
|
||||
mMetaHdr.mVersion = kCacheEntryVersion;
|
||||
mMetaHdr.mExpirationTime = nsICacheEntry::NO_EXPIRATION_TIME;
|
||||
@ -88,7 +87,6 @@ CacheFileMetadata::CacheFileMetadata(bool aMemoryOnly, bool aPinned, const nsACS
|
||||
LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p, key=%s]",
|
||||
this, PromiseFlatCString(aKey).get()));
|
||||
|
||||
MOZ_COUNT_CTOR(CacheFileMetadata);
|
||||
memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
|
||||
mMetaHdr.mVersion = kCacheEntryVersion;
|
||||
if (aPinned) {
|
||||
@ -121,7 +119,6 @@ CacheFileMetadata::CacheFileMetadata()
|
||||
{
|
||||
LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p]", this));
|
||||
|
||||
MOZ_COUNT_CTOR(CacheFileMetadata);
|
||||
memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
|
||||
}
|
||||
|
||||
@ -129,7 +126,6 @@ CacheFileMetadata::~CacheFileMetadata()
|
||||
{
|
||||
LOG(("CacheFileMetadata::~CacheFileMetadata() [this=%p]", this));
|
||||
|
||||
MOZ_COUNT_DTOR(CacheFileMetadata);
|
||||
MOZ_ASSERT(!mListener);
|
||||
|
||||
if (mHashArray) {
|
||||
|
@ -56,7 +56,6 @@ CacheFileOutputStream::CacheFileOutputStream(CacheFile *aFile,
|
||||
, mCallbackFlags(0)
|
||||
{
|
||||
LOG(("CacheFileOutputStream::CacheFileOutputStream() [this=%p]", this));
|
||||
MOZ_COUNT_CTOR(CacheFileOutputStream);
|
||||
|
||||
if (mAlternativeData) {
|
||||
mPos = mFile->mAltDataOffset;
|
||||
@ -66,7 +65,6 @@ CacheFileOutputStream::CacheFileOutputStream(CacheFile *aFile,
|
||||
CacheFileOutputStream::~CacheFileOutputStream()
|
||||
{
|
||||
LOG(("CacheFileOutputStream::~CacheFileOutputStream() [this=%p]", this));
|
||||
MOZ_COUNT_DTOR(CacheFileOutputStream);
|
||||
}
|
||||
|
||||
// nsIOutputStream
|
||||
|
@ -278,7 +278,6 @@ CacheIndex::CacheIndex()
|
||||
{
|
||||
sLock.AssertCurrentThreadOwns();
|
||||
LOG(("CacheIndex::CacheIndex [this=%p]", this));
|
||||
MOZ_COUNT_CTOR(CacheIndex);
|
||||
MOZ_ASSERT(!gInstance, "multiple CacheIndex instances!");
|
||||
}
|
||||
|
||||
@ -286,7 +285,6 @@ CacheIndex::~CacheIndex()
|
||||
{
|
||||
sLock.AssertCurrentThreadOwns();
|
||||
LOG(("CacheIndex::~CacheIndex [this=%p]", this));
|
||||
MOZ_COUNT_DTOR(CacheIndex);
|
||||
|
||||
ReleaseBuffer();
|
||||
}
|
||||
|
@ -41,14 +41,12 @@ class DoomCallbackSynchronizer : public Runnable
|
||||
public:
|
||||
explicit DoomCallbackSynchronizer(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomCallbackSynchronizer);
|
||||
}
|
||||
nsresult Dispatch();
|
||||
|
||||
private:
|
||||
virtual ~DoomCallbackSynchronizer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DoomCallbackSynchronizer);
|
||||
}
|
||||
|
||||
NS_DECL_NSIRUNNABLE
|
||||
@ -94,13 +92,11 @@ class DoomCallbackWrapper : public nsICacheListener
|
||||
|
||||
explicit DoomCallbackWrapper(nsICacheEntryDoomCallback* cb) : mCB(cb)
|
||||
{
|
||||
MOZ_COUNT_CTOR(DoomCallbackWrapper);
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~DoomCallbackWrapper()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DoomCallbackWrapper);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICacheEntryDoomCallback> mCB;
|
||||
@ -143,8 +139,6 @@ _OldVisitCallbackWrapper::~_OldVisitCallbackWrapper()
|
||||
if (mVisitEntries) {
|
||||
mCB->OnCacheEntryVisitCompleted();
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(_OldVisitCallbackWrapper);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP _OldVisitCallbackWrapper::VisitDevice(const char * deviceID,
|
||||
@ -349,20 +343,17 @@ _OldGetDiskConsumption::VisitEntry(const char * deviceID,
|
||||
_OldCacheEntryWrapper::_OldCacheEntryWrapper(nsICacheEntryDescriptor* desc)
|
||||
: mOldDesc(desc), mOldInfo(desc)
|
||||
{
|
||||
MOZ_COUNT_CTOR(_OldCacheEntryWrapper);
|
||||
LOG(("Creating _OldCacheEntryWrapper %p for descriptor %p", this, desc));
|
||||
}
|
||||
|
||||
_OldCacheEntryWrapper::_OldCacheEntryWrapper(nsICacheEntryInfo* info)
|
||||
: mOldDesc(nullptr), mOldInfo(info)
|
||||
{
|
||||
MOZ_COUNT_CTOR(_OldCacheEntryWrapper);
|
||||
LOG(("Creating _OldCacheEntryWrapper %p for info %p", this, info));
|
||||
}
|
||||
|
||||
_OldCacheEntryWrapper::~_OldCacheEntryWrapper()
|
||||
{
|
||||
MOZ_COUNT_DTOR(_OldCacheEntryWrapper);
|
||||
LOG(("Destroying _OldCacheEntryWrapper %p for descriptor %p", this, mOldInfo.get()));
|
||||
}
|
||||
|
||||
@ -680,13 +671,11 @@ _OldCacheLoad::_OldCacheLoad(nsCSubstring const& aScheme,
|
||||
, mRunCount(0)
|
||||
, mAppCache(aAppCache)
|
||||
{
|
||||
MOZ_COUNT_CTOR(_OldCacheLoad);
|
||||
}
|
||||
|
||||
_OldCacheLoad::~_OldCacheLoad()
|
||||
{
|
||||
ProxyReleaseMainThread(mAppCache);
|
||||
MOZ_COUNT_DTOR(_OldCacheLoad);
|
||||
}
|
||||
|
||||
nsresult _OldCacheLoad::Start()
|
||||
@ -907,12 +896,10 @@ _OldStorage::_OldStorage(nsILoadContextInfo* aInfo,
|
||||
, mLookupAppCache(aLookupAppCache)
|
||||
, mOfflineStorage(aOfflineStorage)
|
||||
{
|
||||
MOZ_COUNT_CTOR(_OldStorage);
|
||||
}
|
||||
|
||||
_OldStorage::~_OldStorage()
|
||||
{
|
||||
MOZ_COUNT_DTOR(_OldStorage);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP _OldStorage::AsyncOpenURI(nsIURI *aURI,
|
||||
|
@ -249,7 +249,6 @@ class _OldVisitCallbackWrapper : public nsICacheVisitor
|
||||
, mLoadInfo(aInfo)
|
||||
, mHit(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(_OldVisitCallbackWrapper);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -523,12 +523,10 @@ public:
|
||||
: mPrompter(aPrompter)
|
||||
, mResponseMsg(aResponseMsg)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsFtpChildAsyncAlert);
|
||||
}
|
||||
protected:
|
||||
virtual ~nsFtpChildAsyncAlert()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsFtpChildAsyncAlert);
|
||||
}
|
||||
public:
|
||||
NS_IMETHOD Run() override
|
||||
|
@ -1794,12 +1794,10 @@ public:
|
||||
: mPrompter(aPrompter)
|
||||
, mResponseMsg(aResponseMsg)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsFtpAsyncAlert);
|
||||
}
|
||||
protected:
|
||||
virtual ~nsFtpAsyncAlert()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsFtpAsyncAlert);
|
||||
}
|
||||
public:
|
||||
NS_IMETHOD Run() override
|
||||
|
@ -19,12 +19,10 @@ NS_IMPL_ISUPPORTS(TransportProviderParent,
|
||||
|
||||
TransportProviderParent::TransportProviderParent()
|
||||
{
|
||||
MOZ_COUNT_CTOR(TransportProviderParent);
|
||||
}
|
||||
|
||||
TransportProviderParent::~TransportProviderParent()
|
||||
{
|
||||
MOZ_COUNT_DTOR(TransportProviderParent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -77,12 +75,10 @@ NS_IMPL_ISUPPORTS(TransportProviderChild,
|
||||
|
||||
TransportProviderChild::TransportProviderChild()
|
||||
{
|
||||
MOZ_COUNT_CTOR(TransportProviderChild);
|
||||
}
|
||||
|
||||
TransportProviderChild::~TransportProviderChild()
|
||||
{
|
||||
MOZ_COUNT_DTOR(TransportProviderChild);
|
||||
Send__delete__(this);
|
||||
}
|
||||
|
||||
|
@ -8,21 +8,16 @@ nsHtml5OwningUTF16Buffer::nsHtml5OwningUTF16Buffer(char16_t* aBuffer)
|
||||
: nsHtml5UTF16Buffer(aBuffer, 0),
|
||||
next(nullptr),
|
||||
key(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5OwningUTF16Buffer);
|
||||
}
|
||||
{}
|
||||
|
||||
nsHtml5OwningUTF16Buffer::nsHtml5OwningUTF16Buffer(void* aKey)
|
||||
: nsHtml5UTF16Buffer(nullptr, 0),
|
||||
next(nullptr),
|
||||
key(aKey)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5OwningUTF16Buffer);
|
||||
}
|
||||
{}
|
||||
|
||||
nsHtml5OwningUTF16Buffer::~nsHtml5OwningUTF16Buffer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHtml5OwningUTF16Buffer);
|
||||
DeleteBuffer();
|
||||
|
||||
// This is to avoid dtor recursion on 'next', bug 706932.
|
||||
|
@ -18,13 +18,11 @@ nsHtml5StringParser::nsHtml5StringParser()
|
||||
, mTreeBuilder(new nsHtml5TreeBuilder(mBuilder))
|
||||
, mTokenizer(new nsHtml5Tokenizer(mTreeBuilder, false))
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsHtml5StringParser);
|
||||
mTokenizer->setInterner(&mAtomTable);
|
||||
}
|
||||
|
||||
nsHtml5StringParser::~nsHtml5StringParser()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsHtml5StringParser);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -736,7 +736,6 @@ InMemoryDataSource::InMemoryDataSource(nsISupports* aOuter)
|
||||
NS_INIT_AGGREGATED(aOuter);
|
||||
|
||||
mPropagateChanges = true;
|
||||
MOZ_COUNT_CTOR(InMemoryDataSource);
|
||||
}
|
||||
|
||||
|
||||
@ -768,8 +767,6 @@ InMemoryDataSource::~InMemoryDataSource()
|
||||
|
||||
MOZ_LOG(gLog, LogLevel::Debug,
|
||||
("InMemoryDataSource(%p): destroyed.", this));
|
||||
|
||||
MOZ_COUNT_DTOR(InMemoryDataSource);
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,12 +38,10 @@ nsRDFXMLParser::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
|
||||
nsRDFXMLParser::nsRDFXMLParser()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsRDFXMLParser);
|
||||
}
|
||||
|
||||
nsRDFXMLParser::~nsRDFXMLParser()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsRDFXMLParser);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -95,13 +95,10 @@ nsRDFXMLSerializer::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
|
||||
nsRDFXMLSerializer::nsRDFXMLSerializer()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsRDFXMLSerializer);
|
||||
}
|
||||
|
||||
nsRDFXMLSerializer::~nsRDFXMLSerializer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsRDFXMLSerializer);
|
||||
|
||||
if (--gRefCnt == 0) {
|
||||
NS_IF_RELEASE(kRDF_Bag);
|
||||
NS_IF_RELEASE(kRDF_Seq);
|
||||
|
@ -25,13 +25,11 @@ public:
|
||||
, mTimer(nullptr)
|
||||
, mStop(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CheckResponsivenessTask);
|
||||
}
|
||||
|
||||
protected:
|
||||
~CheckResponsivenessTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(CheckResponsivenessTask);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -85,8 +85,6 @@ PuppetWidget::PuppetWidget(TabChild* aTabChild)
|
||||
, mCursorHotspotY(0)
|
||||
, mNativeKeyCommandsValid(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PuppetWidget);
|
||||
|
||||
mSingleLineCommands.SetCapacity(4);
|
||||
mMultiLineCommands.SetCapacity(4);
|
||||
mRichTextCommands.SetCapacity(4);
|
||||
@ -97,8 +95,6 @@ PuppetWidget::PuppetWidget(TabChild* aTabChild)
|
||||
|
||||
PuppetWidget::~PuppetWidget()
|
||||
{
|
||||
MOZ_COUNT_DTOR(PuppetWidget);
|
||||
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,7 @@ HANDLE sEventHandle = nullptr;
|
||||
// thread.
|
||||
class HWNDGetter : public mozilla::Runnable {
|
||||
public:
|
||||
HWNDGetter() : hidden_window_hwnd(nullptr) {
|
||||
MOZ_COUNT_CTOR(HWNDGetter);
|
||||
}
|
||||
~HWNDGetter() {
|
||||
MOZ_COUNT_DTOR(HWNDGetter);
|
||||
}
|
||||
HWNDGetter() : hidden_window_hwnd(nullptr) {}
|
||||
|
||||
HWND hidden_window_hwnd;
|
||||
|
||||
|
@ -281,11 +281,20 @@ mozilla::StaticAutoPtr<WalkTheStackCodeAddressService> gCodeAddressService;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum BloatEntryType
|
||||
{
|
||||
RefcountedBloatEntry,
|
||||
ManualBloatEntry,
|
||||
};
|
||||
|
||||
class BloatEntry
|
||||
{
|
||||
public:
|
||||
BloatEntry(const char* aClassName, uint32_t aClassSize)
|
||||
BloatEntry(const char* aClassName,
|
||||
uint32_t aClassSize,
|
||||
BloatEntryType aEntryType)
|
||||
: mClassSize(aClassSize)
|
||||
, mEntryType(aEntryType)
|
||||
{
|
||||
MOZ_ASSERT(strlen(aClassName) > 0, "BloatEntry name must be non-empty");
|
||||
mClassName = PL_strdup(aClassName);
|
||||
@ -307,6 +316,11 @@ public:
|
||||
return mClassName;
|
||||
}
|
||||
|
||||
BloatEntryType GetEntryType() const
|
||||
{
|
||||
return mEntryType;
|
||||
}
|
||||
|
||||
void Ctor()
|
||||
{
|
||||
mStats.mCreates++;
|
||||
@ -388,6 +402,7 @@ protected:
|
||||
double mClassSize; // This is stored as a double because of the way we compute the avg class size for total bloat.
|
||||
int64_t mTotalLeaked; // Used only for TOTAL entry.
|
||||
nsTraceRefcntStats mStats;
|
||||
BloatEntryType mEntryType;
|
||||
};
|
||||
|
||||
static void
|
||||
@ -416,7 +431,9 @@ RecreateBloatView()
|
||||
}
|
||||
|
||||
static BloatEntry*
|
||||
GetBloatEntry(const char* aTypeName, uint32_t aInstanceSize)
|
||||
GetBloatEntry(const char* aTypeName,
|
||||
uint32_t aInstanceSize,
|
||||
BloatEntryType aEntryType)
|
||||
{
|
||||
if (!gBloatView) {
|
||||
RecreateBloatView();
|
||||
@ -426,7 +443,7 @@ GetBloatEntry(const char* aTypeName, uint32_t aInstanceSize)
|
||||
entry = (BloatEntry*)PL_HashTableLookup(gBloatView, aTypeName);
|
||||
if (!entry && aInstanceSize > 0) {
|
||||
|
||||
entry = new BloatEntry(aTypeName, aInstanceSize);
|
||||
entry = new BloatEntry(aTypeName, aInstanceSize, aEntryType);
|
||||
PLHashEntry* e = PL_HashTableAdd(gBloatView, aTypeName, entry);
|
||||
if (!e) {
|
||||
delete entry;
|
||||
@ -439,6 +456,8 @@ GetBloatEntry(const char* aTypeName, uint32_t aInstanceSize)
|
||||
"MOZ_COUNT_{C,D}TOR in the constructor or destructor, respectively. "
|
||||
"As a workaround, the MOZ_COUNT_{C,D}TOR calls can be moved to a "
|
||||
"non-templated base class.");
|
||||
MOZ_ASSERT(entry->GetEntryType() == aEntryType,
|
||||
"Don't use MOZ_COUNT_CTOR and MOZ_COUNT_DTOR for refcounted classes.");
|
||||
}
|
||||
}
|
||||
return entry;
|
||||
@ -515,7 +534,8 @@ nsTraceRefcnt::DumpStatistics()
|
||||
AutoRestore<LoggingType> saveLogging(gLogging);
|
||||
gLogging = NoLogging;
|
||||
|
||||
BloatEntry total("TOTAL", 0);
|
||||
BloatEntry total("TOTAL", 0, ManualBloatEntry);
|
||||
// Second and third args are just dummies.
|
||||
PL_HashTableEnumerateEntries(gBloatView, BloatEntry::TotalEntries, &total);
|
||||
const char* msg;
|
||||
if (gLogLeaksOnly) {
|
||||
@ -989,8 +1009,8 @@ namespace mozilla {
|
||||
void
|
||||
LogTerm()
|
||||
{
|
||||
NS_ASSERTION(gInitCount > 0,
|
||||
"NS_LogTerm without matching NS_LogInit");
|
||||
MOZ_ASSERT(gInitCount > 0,
|
||||
"NS_LogTerm without matching NS_LogInit");
|
||||
|
||||
if (--gInitCount == 0) {
|
||||
#ifdef DEBUG
|
||||
@ -1040,7 +1060,7 @@ NS_LogAddRef(void* aPtr, nsrefcnt aRefcnt,
|
||||
AutoTraceLogLock lock;
|
||||
|
||||
if (aRefcnt == 1 && gBloatLog) {
|
||||
BloatEntry* entry = GetBloatEntry(aClass, aClassSize);
|
||||
BloatEntry* entry = GetBloatEntry(aClass, aClassSize, RefcountedBloatEntry);
|
||||
if (entry) {
|
||||
entry->Ctor();
|
||||
}
|
||||
@ -1093,7 +1113,7 @@ NS_LogRelease(void* aPtr, nsrefcnt aRefcnt, const char* aClass)
|
||||
AutoTraceLogLock lock;
|
||||
|
||||
if (aRefcnt == 0 && gBloatLog) {
|
||||
BloatEntry* entry = GetBloatEntry(aClass, 0);
|
||||
BloatEntry* entry = GetBloatEntry(aClass, 0, RefcountedBloatEntry);
|
||||
if (entry) {
|
||||
entry->Dtor();
|
||||
}
|
||||
@ -1152,7 +1172,7 @@ NS_LogCtor(void* aPtr, const char* aType, uint32_t aInstanceSize)
|
||||
AutoTraceLogLock lock;
|
||||
|
||||
if (gBloatLog) {
|
||||
BloatEntry* entry = GetBloatEntry(aType, aInstanceSize);
|
||||
BloatEntry* entry = GetBloatEntry(aType, aInstanceSize, ManualBloatEntry);
|
||||
if (entry) {
|
||||
entry->Ctor();
|
||||
}
|
||||
@ -1189,7 +1209,7 @@ NS_LogDtor(void* aPtr, const char* aType, uint32_t aInstanceSize)
|
||||
AutoTraceLogLock lock;
|
||||
|
||||
if (gBloatLog) {
|
||||
BloatEntry* entry = GetBloatEntry(aType, aInstanceSize);
|
||||
BloatEntry* entry = GetBloatEntry(aType, aInstanceSize, ManualBloatEntry);
|
||||
if (entry) {
|
||||
entry->Dtor();
|
||||
}
|
||||
|
@ -89,12 +89,17 @@ private:
|
||||
static_assert(mozilla::IsClass<_type>::value, \
|
||||
"Token '" #_type "' is not a class type.")
|
||||
|
||||
#define MOZ_ASSERT_NOT_ISUPPORTS(_type) \
|
||||
static_assert(!mozilla::IsBaseOf<nsISupports, _type>::value, \
|
||||
"nsISupports classes don't need to call MOZ_COUNT_CTOR or MOZ_COUNT_DTOR");
|
||||
|
||||
// Note that the following constructor/destructor logging macros are redundant
|
||||
// for refcounted objects that log via the NS_LOG_ADDREF/NS_LOG_RELEASE macros.
|
||||
// Refcount logging is preferred.
|
||||
#define MOZ_COUNT_CTOR(_type) \
|
||||
do { \
|
||||
MOZ_ASSERT_CLASSNAME(_type); \
|
||||
MOZ_ASSERT_NOT_ISUPPORTS(_type); \
|
||||
NS_LogCtor((void*)this, #_type, sizeof(*this)); \
|
||||
} while (0)
|
||||
|
||||
@ -102,6 +107,7 @@ do { \
|
||||
do { \
|
||||
MOZ_ASSERT_CLASSNAME(_type); \
|
||||
MOZ_ASSERT_CLASSNAME(_base); \
|
||||
MOZ_ASSERT_NOT_ISUPPORTS(_type); \
|
||||
NS_LogCtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
|
||||
} while (0)
|
||||
|
||||
@ -113,6 +119,7 @@ do { \
|
||||
#define MOZ_COUNT_DTOR(_type) \
|
||||
do { \
|
||||
MOZ_ASSERT_CLASSNAME(_type); \
|
||||
MOZ_ASSERT_NOT_ISUPPORTS(_type); \
|
||||
NS_LogDtor((void*)this, #_type, sizeof(*this)); \
|
||||
} while (0)
|
||||
|
||||
@ -120,6 +127,7 @@ do { \
|
||||
do { \
|
||||
MOZ_ASSERT_CLASSNAME(_type); \
|
||||
MOZ_ASSERT_CLASSNAME(_base); \
|
||||
MOZ_ASSERT_NOT_ISUPPORTS(_type); \
|
||||
NS_LogDtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -47,12 +47,12 @@ public:
|
||||
#include "xptcstubsdef.inc"
|
||||
|
||||
nsXPTCStubBase(nsIXPTCProxy* aOuter, xptiInterfaceEntry *aEntry)
|
||||
: mOuter(aOuter), mEntry(aEntry) { MOZ_COUNT_CTOR(nsXPTCStubBase); }
|
||||
: mOuter(aOuter), mEntry(aEntry) {}
|
||||
|
||||
nsIXPTCProxy* mOuter;
|
||||
xptiInterfaceEntry* mEntry;
|
||||
|
||||
~nsXPTCStubBase() { MOZ_COUNT_DTOR(nsXPTCStubBase); }
|
||||
~nsXPTCStubBase() {}
|
||||
};
|
||||
|
||||
#undef STUB_ENTRY
|
||||
|
@ -159,13 +159,11 @@ SharedThreadPool::SharedThreadPool(const nsCString& aName,
|
||||
, mPool(aPool)
|
||||
, mRefCnt(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(SharedThreadPool);
|
||||
mEventTarget = do_QueryInterface(aPool);
|
||||
}
|
||||
|
||||
SharedThreadPool::~SharedThreadPool()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SharedThreadPool);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -143,7 +143,6 @@ nsTimerImpl::nsTimerImpl(nsITimer* aTimer) :
|
||||
mDelay(0),
|
||||
mITimer(aTimer)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsTimerImpl);
|
||||
// XXXbsmedberg: shouldn't this be in Init()?
|
||||
mEventTarget = static_cast<nsIEventTarget*>(NS_GetCurrentThread());
|
||||
|
||||
@ -152,7 +151,6 @@ nsTimerImpl::nsTimerImpl(nsITimer* aTimer) :
|
||||
|
||||
nsTimerImpl::~nsTimerImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsTimerImpl);
|
||||
ReleaseCallback();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user