mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1338901 - nsViewManager::ProcessPendingUpdatesForView should use AutoTArray to avoid alloc/free, r=tn
This commit is contained in:
parent
1da078f101
commit
35e2f8c417
@ -383,7 +383,7 @@ nsViewManager::ProcessPendingUpdatesForView(nsView* aView,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> rootShell(mPresShell);
|
||||
nsTArray<nsCOMPtr<nsIWidget> > widgets;
|
||||
AutoTArray<nsCOMPtr<nsIWidget>, 1> widgets;
|
||||
aView->GetViewManager()->ProcessPendingUpdatesRecurse(aView, widgets);
|
||||
for (uint32_t i = 0; i < widgets.Length(); ++i) {
|
||||
nsView* view = nsView::GetViewFor(widgets[i]);
|
||||
@ -422,7 +422,7 @@ nsViewManager::ProcessPendingUpdatesForView(nsView* aView,
|
||||
|
||||
void
|
||||
nsViewManager::ProcessPendingUpdatesRecurse(nsView* aView,
|
||||
nsTArray<nsCOMPtr<nsIWidget> >& aWidgets)
|
||||
AutoTArray<nsCOMPtr<nsIWidget>, 1>& aWidgets)
|
||||
{
|
||||
if (mPresShell && mPresShell->IsNeverPainting()) {
|
||||
return;
|
||||
|
@ -329,7 +329,7 @@ private:
|
||||
void ProcessPendingUpdatesForView(nsView *aView,
|
||||
bool aFlushDirtyRegion = true);
|
||||
void ProcessPendingUpdatesRecurse(nsView* aView,
|
||||
nsTArray<nsCOMPtr<nsIWidget> >& aWidgets);
|
||||
AutoTArray<nsCOMPtr<nsIWidget>, 1>& aWidgets);
|
||||
void ProcessPendingUpdatesPaint(nsIWidget* aWidget);
|
||||
|
||||
void FlushDirtyRegionToWidget(nsView* aView);
|
||||
|
Loading…
Reference in New Issue
Block a user