mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1011574 - Throw the right exception when putImageData is passed an ImageData with a neutered buffer. r=bjacob
This commit is contained in:
parent
a47d198749
commit
736f4d5851
@ -4046,7 +4046,7 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t x, int32_t y, uint32_t w
|
||||
int32_t dirtyWidth, int32_t dirtyHeight)
|
||||
{
|
||||
if (w == 0 || h == 0) {
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_ERROR_DOM_INVALID_STATE_ERR;
|
||||
}
|
||||
|
||||
IntRect dirtyRect;
|
||||
@ -4100,7 +4100,7 @@ CanvasRenderingContext2D::PutImageData_explicit(int32_t x, int32_t y, uint32_t w
|
||||
|
||||
uint32_t len = w * h * 4;
|
||||
if (dataLen != len) {
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
return NS_ERROR_DOM_INVALID_STATE_ERR;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxImageSurface> imgsurf = new gfxImageSurface(gfxIntSize(w, h),
|
||||
|
Loading…
Reference in New Issue
Block a user