зеркало из https://github.com/mozilla/pjs.git
Fix leak of nsImageGTK (or equivalent on other platforms). r=waterson@netscape.com
This commit is contained in:
Родитель
bab3388ec5
Коммит
82f00f4213
|
@ -2089,7 +2089,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
|
||||
// Lookup the image
|
||||
nsSize imageSize;
|
||||
nsIImage* image = nsnull;
|
||||
nsCOMPtr<nsIImage> image;
|
||||
nsIFrameImageLoader* loader = nsnull;
|
||||
nsresult rv = aPresContext->StartLoadImage(aColor.mBackgroundImage,
|
||||
transparentBG
|
||||
|
@ -2100,7 +2100,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
nsnull, nsnull,
|
||||
&loader);
|
||||
if ((NS_OK != rv) || (nsnull == loader) ||
|
||||
(loader->GetImage(&image), (nsnull == image))) {
|
||||
(loader->GetImage(getter_AddRefs(image)), (!image))) {
|
||||
NS_IF_RELEASE(loader);
|
||||
// Redraw will happen later
|
||||
if (!transparentBG) {
|
||||
|
@ -2460,7 +2460,6 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
// Restore clipping
|
||||
aRenderingContext.PopState(clipState);
|
||||
#endif
|
||||
NS_IF_RELEASE(image);
|
||||
} else {
|
||||
// See if there's a background color specified. The background color
|
||||
// is rendered over the 'border' 'padding' and 'content' areas
|
||||
|
|
|
@ -2089,7 +2089,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
|
||||
// Lookup the image
|
||||
nsSize imageSize;
|
||||
nsIImage* image = nsnull;
|
||||
nsCOMPtr<nsIImage> image;
|
||||
nsIFrameImageLoader* loader = nsnull;
|
||||
nsresult rv = aPresContext->StartLoadImage(aColor.mBackgroundImage,
|
||||
transparentBG
|
||||
|
@ -2100,7 +2100,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
nsnull, nsnull,
|
||||
&loader);
|
||||
if ((NS_OK != rv) || (nsnull == loader) ||
|
||||
(loader->GetImage(&image), (nsnull == image))) {
|
||||
(loader->GetImage(getter_AddRefs(image)), (!image))) {
|
||||
NS_IF_RELEASE(loader);
|
||||
// Redraw will happen later
|
||||
if (!transparentBG) {
|
||||
|
@ -2460,7 +2460,6 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext,
|
|||
// Restore clipping
|
||||
aRenderingContext.PopState(clipState);
|
||||
#endif
|
||||
NS_IF_RELEASE(image);
|
||||
} else {
|
||||
// See if there's a background color specified. The background color
|
||||
// is rendered over the 'border' 'padding' and 'content' areas
|
||||
|
|
Загрузка…
Ссылка в новой задаче