Bug 381777 - filters crash browser. r+sr=sr=tor

This commit is contained in:
longsonr@gmail.com 2007-05-25 02:50:02 -07:00
Родитель f6b90fe77d
Коммит 24e36318b1
1 изменённых файлов: 8 добавлений и 8 удалений

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

@ -323,16 +323,16 @@ nsSVGFilterResource::AcquireSourceImage(nsIDOMSVGAnimatedString* aIn,
return NS_ERROR_FAILURE;
}
if (aSurface) {
*aSurface = nsnull;
surface.swap(*aSurface);
}
mInstance->GetFilterSubregion(aFilter, defaultRect, &mRect);
mSourceData = surface->Data();
mStride = surface->Stride();
*aSourceData = mSourceData;
if (aSurface) {
*aSurface = nsnull;
surface.swap(*aSurface);
}
return NS_OK;
}
@ -347,10 +347,6 @@ nsSVGFilterResource::AcquireTargetImage(nsIDOMSVGAnimatedString* aResult,
return NS_ERROR_FAILURE;
}
if (aSurface) {
*aSurface = mTargetImage;
NS_ADDREF(*aSurface);
}
mTargetData = mTargetImage->Data();
mStride = mTargetImage->Stride();
gfxIntSize size = mTargetImage->GetSize();
@ -358,6 +354,10 @@ nsSVGFilterResource::AcquireTargetImage(nsIDOMSVGAnimatedString* aResult,
mHeight = size.height;
*aTargetData = mTargetData;
if (aSurface) {
*aSurface = mTargetImage;
NS_ADDREF(*aSurface);
}
return NS_OK;
}