Adding assertions to discover when the script object isn't being

properly cleared out.
This commit is contained in:
hyatt%netscape.com 2000-04-01 11:17:28 +00:00
parent fc8d5ec6e6
commit 8c9c03ac07
2 changed files with 6 additions and 0 deletions

View File

@ -334,6 +334,8 @@ nsXBLBinding::nsXBLBinding(void)
nsXBLBinding::~nsXBLBinding(void)
{
NS_ASSERTION(!mScriptObject, "XBL binding hasn't properly cleared its script object out.");
delete mAttributeTable;
gRefCnt--;
@ -957,6 +959,7 @@ nsXBLBinding::RemoveScriptReferences(nsIScriptContext* aContext)
if (mScriptObject) {
aContext->RemoveReference((void*) &mScriptObject, mScriptObject);
mScriptObject = nsnull;
}
return NS_OK;

View File

@ -334,6 +334,8 @@ nsXBLBinding::nsXBLBinding(void)
nsXBLBinding::~nsXBLBinding(void)
{
NS_ASSERTION(!mScriptObject, "XBL binding hasn't properly cleared its script object out.");
delete mAttributeTable;
gRefCnt--;
@ -957,6 +959,7 @@ nsXBLBinding::RemoveScriptReferences(nsIScriptContext* aContext)
if (mScriptObject) {
aContext->RemoveReference((void*) &mScriptObject, mScriptObject);
mScriptObject = nsnull;
}
return NS_OK;