зеркало из https://github.com/mozilla/pjs.git
Adding assertions to discover when the script object isn't being
properly cleared out.
This commit is contained in:
Родитель
fa0da8ef83
Коммит
749c6294b2
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче