mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 888236 - Cleanup MetroWidget's Destroy method, shutdown layer manager and call base widget destroy methods. Potential fix for crash in nsIFrame::GetNearestWidget(). r=bbondy
This commit is contained in:
parent
3718002644
commit
92e43f1a4b
@ -244,9 +244,29 @@ MetroWidget::Destroy()
|
||||
return NS_OK;
|
||||
Log("[%X] %s mWnd=%X type=%d", this, __FUNCTION__, mWnd, mWindowType);
|
||||
mOnDestroyCalled = true;
|
||||
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip(this);
|
||||
|
||||
RemoveSubclass();
|
||||
NotifyWindowDestroyed();
|
||||
|
||||
// Prevent the widget from sending additional events.
|
||||
mWidgetListener = nullptr;
|
||||
mAttachedWidgetListener = nullptr;
|
||||
|
||||
// Release references to children, device context, toolkit, and app shell.
|
||||
nsBaseWidget::Destroy();
|
||||
nsBaseWidget::OnDestroy();
|
||||
|
||||
if (mLayerManager) {
|
||||
mLayerManager->Destroy();
|
||||
}
|
||||
|
||||
mLayerManager = nullptr;
|
||||
mView = nullptr;
|
||||
mIdleService = nullptr;
|
||||
mWnd = NULL;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user