Bug 540868 part 3: when deallocating NPObjects in leakcount builds, let the leak monitor know that we cleaned them up correctly, r=bent

This commit is contained in:
Benjamin Smedberg 2010-01-22 10:06:30 -05:00
parent 5ff7ecd852
commit 32dd918b29

View File

@ -1588,6 +1588,16 @@ PluginModuleChild::DeallocForInstance(NPObjectData* d, void* userArg)
if (o->_class && o->_class->invalidate)
o->_class->invalidate(o);
#ifdef NS_BUILD_REFCNT_LOGGING
{
int32_t refCnt = o->referenceCount;
while (refCnt) {
--refCnt;
NS_LOG_RELEASE(o, refCnt, "NPObject");
}
}
#endif
DeallocNPObject(o);
if (d->actor)