| Index: third_party/WebKit/Source/core/html/ImageData.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/ImageData.cpp b/third_party/WebKit/Source/core/html/ImageData.cpp
|
| index 5cf5773b2eb3a0edba6703f048236006d606eb2f..1188a21b96a0d4b7b62c66fe8a09df0310b665cb 100644
|
| --- a/third_party/WebKit/Source/core/html/ImageData.cpp
|
| +++ b/third_party/WebKit/Source/core/html/ImageData.cpp
|
| @@ -156,6 +156,10 @@ ScriptPromise ImageData::createImageBitmap(ScriptState* scriptState, EventTarget
|
| exceptionState.throwDOMException(InvalidStateError, "The source data has been neutered.");
|
| return ScriptPromise();
|
| }
|
| + if ((options.hasResizeWidth() && options.resizeWidth() <= 0) || (options.hasResizeHeight() && options.resizeHeight() <= 0)) {
|
| + exceptionState.throwDOMException(InvalidStateError, "The resizeWidth or/and resizeHeight is less than or equals to 0.");
|
| + return ScriptPromise();
|
| + }
|
| return ImageBitmapSource::fulfillImageBitmap(scriptState, ImageBitmap::create(this, IntRect(sx, sy, sw, sh), options));
|
| }
|
|
|
|
|