mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
leaking nsIRegions in nsViewManager::ProcessPendingUpdates() when region is empty. Duh! Switched to nsCOMPtr.
This commit is contained in:
parent
854aa7f8a3
commit
ff9ac41de5
@ -1310,12 +1310,11 @@ void nsViewManager :: UpdateDirtyViews(nsIView *aView, nsRect *aParentRect) cons
|
||||
|
||||
void nsViewManager::ProcessPendingUpdates(nsIView* aView)
|
||||
{
|
||||
nsIRegion* dirtyRegion = nsnull;
|
||||
aView->GetDirtyRegion(dirtyRegion);
|
||||
nsCOMPtr<nsIRegion> dirtyRegion;
|
||||
aView->GetDirtyRegion(*getter_AddRefs(dirtyRegion));
|
||||
if (dirtyRegion != nsnull && !dirtyRegion->IsEmpty()) {
|
||||
UpdateView(aView, dirtyRegion, 0);
|
||||
dirtyRegion->Init();
|
||||
NS_RELEASE(dirtyRegion);
|
||||
}
|
||||
|
||||
// process pending updates in child view.
|
||||
|
Loading…
Reference in New Issue
Block a user