mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 01:10:22 +00:00
Adding assertions to discover when the script object isn't being
properly cleared out.
This commit is contained in:
parent
fc8d5ec6e6
commit
8c9c03ac07
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user