Bug 1266466 - Fix missing call to parent Destroy function in Android's nsWindow. r=snorp

MozReview-Commit-ID: 3LH098M8Mdh
This commit is contained in:
Kartikaya Gupta 2016-04-21 15:07:01 -04:00
Родитель 9191a8ed82
Коммит 4c6dbce80d
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -1328,12 +1328,17 @@ nsWindow::Destroy(void)
mGeckoViewSupport = nullptr;
}
// Stuff below may release the last ref to this
nsCOMPtr<nsIWidget> kungFuDeathGrip(this);
while (mChildren.Length()) {
// why do we still have children?
ALOG("### Warning: Destroying window %p and reparenting child %p to null!", (void*)this, (void*)mChildren[0]);
mChildren[0]->SetParent(nullptr);
}
nsBaseWidget::Destroy();
if (IsTopLevel())
gTopLevelWindows.RemoveElement(this);