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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp

Issue 1901103006: Web MIDI: Replace ASSERT macros with DCHECK macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
index 1f21d1af9b37795fdd0917687643a220f0b1a16e..ad5f360694195a5c931c610ddf901495308250ee 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp
@@ -125,7 +125,7 @@ private:
bool acceptCurrentSysex()
{
- ASSERT(isSysex());
+ DCHECK(isSysex());
for (m_offset++; !isEndOfData(); m_offset++) {
if (isReservedStatusByte())
return false;
@@ -143,10 +143,10 @@ private:
bool acceptCurrentMessage()
{
- ASSERT(isStatusByte());
- ASSERT(!isSysex());
- ASSERT(!isReservedStatusByte());
- ASSERT(!isRealTimeMessage());
+ DCHECK(isStatusByte());
+ DCHECK(!isSysex());
+ DCHECK(!isReservedStatusByte());
+ DCHECK(!isRealTimeMessage());
static const int channelMessageLength[7] = { 3, 3, 3, 3, 2, 2, 3 }; // for 0x8*, 0x9*, ..., 0xe*
static const int systemMessageLength[7] = { 2, 3, 2, 0, 0, 1, 0 }; // for 0xf1, 0xf2, ..., 0xf7
size_t length = isSystemMessage() ? systemMessageLength[m_data[m_offset] - 0xf1] : channelMessageLength[(m_data[m_offset] >> 4) - 8];
@@ -177,7 +177,7 @@ private:
MIDIOutput* MIDIOutput::create(MIDIAccess* access, unsigned portIndex, const String& id, const String& manufacturer, const String& name, const String& version, PortState state)
{
- ASSERT(access);
+ DCHECK(access);
MIDIOutput* output = new MIDIOutput(access, portIndex, id, manufacturer, name, version, state);
output->suspendIfNeeded();
return output;
@@ -195,7 +195,7 @@ MIDIOutput::~MIDIOutput()
void MIDIOutput::send(DOMUint8Array* array, double timestamp, ExceptionState& exceptionState)
{
- ASSERT(array);
+ DCHECK(array);
if (timestamp == 0.0)
timestamp = now(getExecutionContext());
@@ -231,7 +231,7 @@ void MIDIOutput::send(Vector<unsigned> unsignedData, double timestamp, Exception
void MIDIOutput::send(DOMUint8Array* data, ExceptionState& exceptionState)
{
- ASSERT(data);
+ DCHECK(data);
send(data, 0.0, exceptionState);
}
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIInput.cpp ('k') | third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698