Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1517)

Unified Diff: Source/modules/imagebitmap/ImageBitmapFactories.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/filesystem/DOMFileSystemSync.cpp ('k') | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/modules/filesystem/DOMFileSystemSync.cpp ('k') | Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698