mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876630. The async widget release is no longer needed in nsComboBoxFrame because the view subsystem now does the widget destroy async. r=mats
This commit is contained in:
parent
31fd633e58
commit
578e7a98db
@ -131,26 +131,6 @@ NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, u
|
|||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsComboboxControlFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsComboboxControlFrame)
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
class DestroyWidgetRunnable : public nsRunnable {
|
|
||||||
public:
|
|
||||||
NS_DECL_NSIRUNNABLE
|
|
||||||
|
|
||||||
explicit DestroyWidgetRunnable(nsIWidget* aWidget) : mWidget(aWidget) {}
|
|
||||||
|
|
||||||
private:
|
|
||||||
nsCOMPtr<nsIWidget> mWidget;
|
|
||||||
};
|
|
||||||
|
|
||||||
NS_IMETHODIMP DestroyWidgetRunnable::Run()
|
|
||||||
{
|
|
||||||
mWidget = nullptr;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
// Reflow Debugging Macros
|
// Reflow Debugging Macros
|
||||||
// These let us "see" how many reflow counts are happening
|
// These let us "see" how many reflow counts are happening
|
||||||
@ -389,12 +369,7 @@ nsComboboxControlFrame::ShowList(bool aShowList)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (widget) {
|
if (widget) {
|
||||||
nsCOMPtr<nsIRunnable> widgetDestroyer =
|
|
||||||
new DestroyWidgetRunnable(widget);
|
|
||||||
// 'widgetDestroyer' now has a strong ref on the widget so calling
|
|
||||||
// DestroyWidget here will not *delete* it.
|
|
||||||
view->DestroyWidget();
|
view->DestroyWidget();
|
||||||
NS_DispatchToMainThread(widgetDestroyer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user