mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
#8325 "[PP]Exiting Profile Manager and crash". r=sfraser, a=chofmann.
This commit is contained in:
parent
ef85fb6fbd
commit
2809961b0f
@ -85,6 +85,24 @@ nsWindow::nsWindow() : nsBaseWidget() , nsDeleteObserved(this)
|
||||
//-------------------------------------------------------------------------
|
||||
nsWindow::~nsWindow()
|
||||
{
|
||||
// notify the children that we're gone
|
||||
nsCOMPtr<nsIEnumerator> children ( getter_AddRefs(GetChildren()) );
|
||||
if (children)
|
||||
{
|
||||
children->First();
|
||||
do
|
||||
{
|
||||
nsISupports* child;
|
||||
if (NS_SUCCEEDED(children->CurrentItem(&child)))
|
||||
{
|
||||
nsWindow* childWindow = static_cast<nsWindow*>(child);
|
||||
NS_RELEASE(child);
|
||||
|
||||
childWindow->mParent = nsnull;
|
||||
}
|
||||
} while (NS_SUCCEEDED(children->Next()));
|
||||
}
|
||||
|
||||
mDestructorCalled = PR_TRUE;
|
||||
|
||||
//Destroy();
|
||||
|
Loading…
Reference in New Issue
Block a user