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

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

Issue 183253003: Consistently use ExceptionState::throwTypeError(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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/core/xml/XMLSerializer.cpp ('k') | Source/modules/webmidi/MIDIOutput.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 eae94095b4a11d2a4ac9e33c00446941b17c99ac..5300a5d0160a53e00b0ed81d1e8f228031a5a9e5 100644
--- a/Source/modules/imagebitmap/ImageBitmapFactories.cpp
+++ b/Source/modules/imagebitmap/ImageBitmapFactories.cpp
@@ -192,7 +192,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget,
ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget, Blob* blob, ExceptionState& exceptionState)
{
if (!blob) {
- exceptionState.throwDOMException(TypeError, "The blob provided is invalid.");
+ exceptionState.throwTypeError("The blob provided is invalid.");
return ScriptPromise();
}
ScriptPromise promise = ScriptPromise::createPending(eventTarget.executionContext());
@@ -206,7 +206,7 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget,
ScriptPromise ImageBitmapFactories::createImageBitmap(EventTarget& eventTarget, Blob* blob, int sx, int sy, int sw, int sh, ExceptionState& exceptionState)
{
if (!blob) {
- exceptionState.throwDOMException(TypeError, "The blob provided is invalid.");
+ exceptionState.throwTypeError("The blob provided is invalid.");
return ScriptPromise();
}
if (!sw || !sh) {
« no previous file with comments | « Source/core/xml/XMLSerializer.cpp ('k') | Source/modules/webmidi/MIDIOutput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698