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:
Timothy Nikkel 2013-05-28 12:27:36 -05:00
parent 31fd633e58
commit 578e7a98db

View File

@ -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);
} }
} }