| Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| index 47235e8c16096cb83b99d65470f488ad20be513c..c18c69fab12bd2b9029b27a268d1ffff03cf1144 100644
|
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
| @@ -1809,17 +1809,10 @@ PassRefPtrWillBeRawPtr<ImageData> CanvasRenderingContext2D::createImageData(Pass
|
|
|
| PassRefPtrWillBeRawPtr<ImageData> CanvasRenderingContext2D::createImageData(float sw, float sh, ExceptionState& exceptionState) const
|
| {
|
| - if (!sw || !sh)
|
| + if (!sw || !sh) {
|
| exceptionState.throwDOMException(IndexSizeError, String::format("The source %s is 0.", sw ? "height" : "width"));
|
| - // FIXME: These exceptions will be thrown by generated bindings code once
|
| - // crbug.com/354298 is fixed.
|
| - else if (!std::isfinite(sw))
|
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(sw, "source width"));
|
| - else if (!std::isfinite(sh))
|
| - exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(sh, "source height"));
|
| -
|
| - if (exceptionState.hadException())
|
| return nullptr;
|
| + }
|
|
|
| FloatSize logicalSize(fabs(sw), fabs(sh));
|
| if (!logicalSize.isExpressibleAsIntSize())
|
|
|