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
Родитель 87de3de768
Коммит 38d4e9f9ee
1 изменённых файлов: 0 добавлений и 25 удалений

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

@ -131,26 +131,6 @@ NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, u
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
// These let us "see" how many reflow counts are happening
@ -389,12 +369,7 @@ nsComboboxControlFrame::ShowList(bool aShowList)
}
} else {
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();
NS_DispatchToMainThread(widgetDestroyer);
}
}