зеркало из https://github.com/mozilla/gecko-dev.git
Add nsTraceRefcnt debugging hooks for a few MS-COM objects, some of which are leaking. r=rods sr=jag b=114171
This commit is contained in:
Родитель
7cc0fdc6b3
Коммит
051d7cc944
|
@ -129,8 +129,10 @@ STDMETHODIMP nsDataObj::QueryInterface(REFIID riid, void** ppv)
|
|||
STDMETHODIMP_(ULONG) nsDataObj::AddRef()
|
||||
{
|
||||
++g_cRef;
|
||||
++m_cRef;
|
||||
NS_LOG_ADDREF(this, m_cRef, "nsDataObj", sizeof(*this));
|
||||
//PRNTDEBUG3("nsDataObj::AddRef >>>>>>>>>>>>>>>>>> %d on %p\n", (m_cRef+1), this);
|
||||
return ++m_cRef;
|
||||
return m_cRef;
|
||||
}
|
||||
|
||||
|
||||
|
@ -141,6 +143,7 @@ STDMETHODIMP_(ULONG) nsDataObj::Release()
|
|||
if (0 < g_cRef)
|
||||
--g_cRef;
|
||||
|
||||
NS_LOG_RELEASE(this, m_cRef, "nsDataObj");
|
||||
if (0 != --m_cRef)
|
||||
return m_cRef;
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "nsNativeDragSource.h"
|
||||
#include <stdio.h>
|
||||
#include "nsISupportsImpl.h"
|
||||
|
||||
|
||||
/*
|
||||
|
@ -71,12 +72,16 @@ STDMETHODIMP nsNativeDragSource::QueryInterface(REFIID riid, void** ppv)
|
|||
|
||||
STDMETHODIMP_(ULONG) nsNativeDragSource::AddRef(void)
|
||||
{
|
||||
return ++m_cRef;
|
||||
++m_cRef;
|
||||
NS_LOG_ADDREF(this, m_cRef, "nsNativeDragSource", sizeof(*this));
|
||||
return m_cRef;
|
||||
}
|
||||
|
||||
STDMETHODIMP_(ULONG) nsNativeDragSource::Release(void)
|
||||
{
|
||||
if (0 != --m_cRef)
|
||||
--m_cRef;
|
||||
NS_LOG_RELEASE(this, m_cRef, "nsNativeDragSource");
|
||||
if (0 != m_cRef)
|
||||
return m_cRef;
|
||||
|
||||
delete this;
|
||||
|
|
|
@ -117,13 +117,17 @@ STDMETHODIMP nsNativeDragTarget::QueryInterface(REFIID riid, void** ppv)
|
|||
//-----------------------------------------------------
|
||||
STDMETHODIMP_(ULONG) nsNativeDragTarget::AddRef(void)
|
||||
{
|
||||
return ++m_cRef;
|
||||
++m_cRef;
|
||||
NS_LOG_ADDREF(this, m_cRef, "nsNativeDragTarget", sizeof(*this));
|
||||
return m_cRef;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
STDMETHODIMP_(ULONG) nsNativeDragTarget::Release(void)
|
||||
{
|
||||
if (0 != --m_cRef)
|
||||
--m_cRef;
|
||||
NS_LOG_RELEASE(this, m_cRef, "nsNativeDragTarget");
|
||||
if (0 != m_cRef)
|
||||
return m_cRef;
|
||||
|
||||
delete this;
|
||||
|
|
Загрузка…
Ссылка в новой задаче