| 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 ea7dd1d06b1bde620311c0cc754ef06399d5fa75..a41f0c69a83ff962d9490753f956682b135ca320 100644
|
| --- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| +++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
| @@ -305,7 +305,9 @@ ScriptPromise OffscreenCanvas::convertToBlob(ScriptState* scriptState,
|
| imageData = this->renderingContext()->toImageData(SnapshotReasonUnknown);
|
| }
|
| if (!imageData) {
|
| - return ScriptPromise();
|
| + exceptionState.throwDOMException(
|
| + InvalidStateError, "OffscreenCanvas object has no rendering contexts");
|
| + return exceptionState.reject(scriptState);
|
| }
|
|
|
| ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
|
|
|