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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIPort.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
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp
index 3419bca61961e362fc89c8333ee100d38e7ae75d..dfb127ee4bd9daa2d4f384560da3456e21eb9664 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp
@@ -50,9 +50,9 @@ MIDIPort::MIDIPort(MIDIAccess* access, const String& id, const String& manufactu
, m_access(access)
, m_connection(ConnectionStateClosed)
{
- ASSERT(access);
- ASSERT(type == TypeInput || type == TypeOutput);
- ASSERT(state == PortState::MIDIPortStateDisconnected
+ DCHECK(access);
+ DCHECK(type == TypeInput || type == TypeOutput);
+ DCHECK(state == PortState::MIDIPortStateDisconnected
|| state == PortState::MIDIPortStateConnected);
m_state = state;
}
@@ -126,7 +126,7 @@ void MIDIPort::setState(PortState state)
case PortState::MIDIPortStateConnected:
switch (m_connection) {
case ConnectionStateOpen:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
break;
case ConnectionStatePending:
// We do not use |setStates| in order not to dispatch events twice.
@@ -193,7 +193,7 @@ ScriptPromise MIDIPort::reject(ScriptState* scriptState, ExceptionCode ec, const
void MIDIPort::setStates(PortState state, ConnectionState connection)
{
- ASSERT(state != PortState::MIDIPortStateDisconnected || connection != ConnectionStateOpen);
+ DCHECK(state != PortState::MIDIPortStateDisconnected || connection != ConnectionStateOpen);
if (m_state == state && m_connection == connection)
return;
m_state = state;
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIOutput.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698