diff --git a/dom/plugins/PluginModuleChild.cpp b/dom/plugins/PluginModuleChild.cpp index 22f0b651c99a..df41ed32ea82 100644 --- a/dom/plugins/PluginModuleChild.cpp +++ b/dom/plugins/PluginModuleChild.cpp @@ -1067,7 +1067,7 @@ _createobject(NPP aNPP, if (newObject) { newObject->_class = aClass; newObject->referenceCount = 1; - NS_LOG_ADDREF(newObject, 1, "ChildNPObject", sizeof(NPObject)); + NS_LOG_ADDREF(newObject, 1, "NPObject", sizeof(NPObject)); } return newObject; } @@ -1078,7 +1078,7 @@ _retainobject(NPObject* aNPObj) AssertPluginThread(); int32_t refCnt = PR_AtomicIncrement((PRInt32*)&aNPObj->referenceCount); - NS_LOG_ADDREF(aNPObj, refCnt, "ChildNPObject", sizeof(NPObject)); + NS_LOG_ADDREF(aNPObj, refCnt, "NPObject", sizeof(NPObject)); return aNPObj; } @@ -1089,7 +1089,7 @@ _releaseobject(NPObject* aNPObj) AssertPluginThread(); int32_t refCnt = PR_AtomicDecrement((PRInt32*)&aNPObj->referenceCount); - NS_LOG_RELEASE(aNPObj, refCnt, "ChildNPObject"); + NS_LOG_RELEASE(aNPObj, refCnt, "NPObject"); if (refCnt == 0) { if (aNPObj->_class && aNPObj->_class->deallocate) { diff --git a/dom/plugins/PluginScriptableObjectChild.cpp b/dom/plugins/PluginScriptableObjectChild.cpp index 26a273633603..2f7ddb17c6b0 100644 --- a/dom/plugins/PluginScriptableObjectChild.cpp +++ b/dom/plugins/PluginScriptableObjectChild.cpp @@ -535,7 +535,7 @@ PluginScriptableObjectChild::CreateProxyObject() // own this actor. Set the reference count to 0 here so that when the object // dies we will send the destructor message to the child. object->referenceCount = 0; - NS_LOG_RELEASE(object, 0, "ChildNPObject"); + NS_LOG_RELEASE(object, 0, "NPObject"); object->parent = const_cast(this); return object; diff --git a/dom/plugins/PluginScriptableObjectChild.h b/dom/plugins/PluginScriptableObjectChild.h index 5f1f74002f15..b2dd63dabc9c 100644 --- a/dom/plugins/PluginScriptableObjectChild.h +++ b/dom/plugins/PluginScriptableObjectChild.h @@ -52,7 +52,15 @@ class PluginScriptableObjectChild; struct ChildNPObject : NPObject { ChildNPObject() - : NPObject(), parent(NULL), invalidated(false) { } + : NPObject(), parent(NULL), invalidated(false) + { + MOZ_COUNT_CTOR(ChildNPObject); + } + + ~ChildNPObject() + { + MOZ_COUNT_DTOR(ChildNPObject); + } // |parent| is always valid as long as the actor is alive. Once the actor is // destroyed this will be set to null.