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

Unified Diff: Source/modules/webmidi/MIDIOutput.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/modules/imagebitmap/ImageBitmapFactories.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIOutput.cpp
diff --git a/Source/modules/webmidi/MIDIOutput.cpp b/Source/modules/webmidi/MIDIOutput.cpp
index 8a869a5ecbe779d04213c1be2556f425adfe4e24..872e52debdf0bb2ef51607b72b8f4d1d23e2e416 100644
--- a/Source/modules/webmidi/MIDIOutput.cpp
+++ b/Source/modules/webmidi/MIDIOutput.cpp
@@ -66,15 +66,15 @@ private:
{
while (!isEndOfData() && acceptRealTimeMessages()) {
if (!isStatusByte()) {
- exceptionState.throwDOMException(TypeError, "Running status is not allowed " + getPositionString());
+ exceptionState.throwTypeError("Running status is not allowed " + getPositionString());
return false;
}
if (isEndOfSysEx()) {
- exceptionState.throwDOMException(TypeError, "Unexpected end of system exclusive message " + getPositionString());
+ exceptionState.throwTypeError("Unexpected end of system exclusive message " + getPositionString());
return false;
}
if (isReservedStatusByte()) {
- exceptionState.throwDOMException(TypeError, "Reserved status is not allowed " + getPositionString());
+ exceptionState.throwTypeError("Reserved status is not allowed " + getPositionString());
return false;
}
if (isSysEx()) {
@@ -84,17 +84,17 @@ private:
}
if (!acceptCurrentSysEx()) {
if (isEndOfData())
- exceptionState.throwDOMException(TypeError, "System exclusive message is not ended by end of system exclusive message.");
+ exceptionState.throwTypeError("System exclusive message is not ended by end of system exclusive message.");
else
- exceptionState.throwDOMException(TypeError, "System exclusive message contains a status byte " + getPositionString());
+ exceptionState.throwTypeError("System exclusive message contains a status byte " + getPositionString());
return false;
}
} else {
if (!acceptCurrentMessage()) {
if (isEndOfData())
- exceptionState.throwDOMException(TypeError, "Message is incomplete.");
+ exceptionState.throwTypeError("Message is incomplete.");
else
- exceptionState.throwDOMException(TypeError, "Unexpected status byte at index " + getPositionString());
+ exceptionState.throwTypeError("Unexpected status byte at index " + getPositionString());
return false;
}
}
@@ -211,7 +211,7 @@ void MIDIOutput::send(Vector<unsigned> unsignedData, double timestamp, Exception
for (size_t i = 0; i < unsignedData.size(); ++i) {
if (unsignedData[i] > 0xff) {
- exceptionState.throwDOMException(TypeError, "The value at index " + String::number(i) + " (" + String::number(unsignedData[i]) + ") is greater than 0xFF.");
+ exceptionState.throwTypeError("The value at index " + String::number(i) + " (" + String::number(unsignedData[i]) + ") is greater than 0xFF.");
return;
}
unsigned char value = unsignedData[i] & 0xff;
« no previous file with comments | « Source/modules/imagebitmap/ImageBitmapFactories.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698