mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1209780. Check DrawResult return value in nsBaseDragService. r=seth
This commit is contained in:
parent
0e6b05c3b8
commit
1477693fe7
@ -694,10 +694,14 @@ nsBaseDragService::DrawDragForImage(nsIImageLoadingContent* aImageLoader,
|
||||
if (!ctx)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
imgContainer->Draw(ctx, destSize, ImageRegion::Create(destSize),
|
||||
imgIContainer::FRAME_CURRENT,
|
||||
Filter::GOOD, Nothing(),
|
||||
imgIContainer::FLAG_SYNC_DECODE);
|
||||
DrawResult res =
|
||||
imgContainer->Draw(ctx, destSize, ImageRegion::Create(destSize),
|
||||
imgIContainer::FRAME_CURRENT,
|
||||
Filter::GOOD, Nothing(),
|
||||
imgIContainer::FLAG_SYNC_DECODE);
|
||||
if (res == DrawResult::BAD_IMAGE || res == DrawResult::BAD_ARGS) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
*aSurface = dt->Snapshot();
|
||||
} else {
|
||||
*aSurface = aCanvas->GetSurfaceSnapshot();
|
||||
|
Loading…
Reference in New Issue
Block a user