diff --git a/content/canvas/src/CanvasRenderingContext2D.cpp b/content/canvas/src/CanvasRenderingContext2D.cpp index 5071e22bbc0c..395665e196a9 100644 --- a/content/canvas/src/CanvasRenderingContext2D.cpp +++ b/content/canvas/src/CanvasRenderingContext2D.cpp @@ -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 imgsurf = new gfxImageSurface(gfxIntSize(w, h),