Index: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
index 550ae97f7812703f3bfd86bc1fb93d68371313ce..74d2988faa73344dbc3d3a83d460da634de4f2ea 100644 |
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
@@ -204,7 +204,9 @@ ScriptPromise OffscreenCanvas::convertToBlob(ScriptState* scriptState, |
} |
if (!this->isPaintable()) { |
- return ScriptPromise(); |
+ exceptionState.throwDOMException( |
+ IndexSizeError, "The size of the OffscreenCanvas is zero."); |
+ return exceptionState.reject(scriptState); |
} |
double startTime = WTF::monotonicallyIncreasingTime(); |