| Index: Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.cpp b/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| index 38be61725f830648ec68dc7202287b4fd8b0fae4..c7ebf2dffab69ab52542a92b2dc9382861ba971d 100644
|
| --- a/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| +++ b/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| @@ -124,6 +124,10 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState,
|
| // This variant does not work in worker threads.
|
| ASSERT(eventTarget.toDOMWindow());
|
|
|
| + if (!video->webMediaPlayer()) {
|
| + exceptionState.throwDOMException(InvalidStateError, "No player can be retrieved from the provided video element.");
|
| + return ScriptPromise();
|
| + }
|
| if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
|
| exceptionState.throwDOMException(InvalidStateError, "The provided element has not retrieved data.");
|
| return ScriptPromise();
|
|
|