| Index: Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| diff --git a/Source/modules/imagebitmap/ImageBitmapFactories.cpp b/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| index 36ff8e25006ba59f72eecb4e38a7463fc9c8f022..620323c5e92d42eea5f987aa18ae3b3ab16a26b0 100644
|
| --- a/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| +++ b/Source/modules/imagebitmap/ImageBitmapFactories.cpp
|
| @@ -90,15 +90,15 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| return ScriptPromise();
|
| }
|
| if (!image->cachedImage()) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (image->cachedImage()->image()->isSVGImage()) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| if (!image->cachedImage()->image()->currentFrameHasSingleSecurityOrigin()) {
|
| @@ -130,19 +130,19 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| return ScriptPromise();
|
| }
|
| if (!video->player()) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| if (!video->hasSingleSecurityOrigin()) {
|
| @@ -182,11 +182,11 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| return ScriptPromise();
|
| }
|
| if (!canvas->originClean()) {
|
| - es.throwDOMException(InvalidStateError);
|
| + es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
|
| @@ -199,7 +199,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| ASSERT(RuntimeEnabledFeatures::promiseEnabled());
|
|
|
| if (!blob) {
|
| - es.throwDOMException(TypeError);
|
| + es.throwUninformativeAndGenericDOMException(TypeError);
|
| return ScriptPromise();
|
| }
|
| RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(eventTarget->scriptExecutionContext());
|
| @@ -215,11 +215,11 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| ASSERT(RuntimeEnabledFeatures::promiseEnabled());
|
|
|
| if (!blob) {
|
| - es.throwDOMException(TypeError);
|
| + es.throwUninformativeAndGenericDOMException(TypeError);
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(eventTarget->scriptExecutionContext());
|
| @@ -241,7 +241,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
|
| @@ -260,7 +260,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget* eventTarget,
|
| return ScriptPromise();
|
| }
|
| if (!sw || !sh) {
|
| - es.throwDOMException(IndexSizeError);
|
| + es.throwUninformativeAndGenericDOMException(IndexSizeError);
|
| return ScriptPromise();
|
| }
|
| // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
|
|
|