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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.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/MIDIAccessInitializer.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp
index 766c89cc5d0b1c1c24f47b62e527ebf1a5fd04b3..a67041320b566cb304301758d5efc670cf8a0024 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.cpp
@@ -48,7 +48,7 @@ void MIDIAccessInitializer::dispose()
if (!m_permissionResolved) {
Document* document = toDocument(getExecutionContext());
- ASSERT(document);
+ DCHECK(document);
if (MIDIController* controller = MIDIController::from(document->frame()))
controller->cancelPermissionRequest(this);
m_permissionResolved = true;
@@ -63,7 +63,7 @@ ScriptPromise MIDIAccessInitializer::start()
m_accessor = MIDIAccessor::create(this);
Document* document = toDocument(getExecutionContext());
- ASSERT(document);
+ DCHECK(document);
if (MIDIController* controller = MIDIController::from(document->frame()))
controller->requestPermission(this, m_options);
else
@@ -74,13 +74,13 @@ ScriptPromise MIDIAccessInitializer::start()
void MIDIAccessInitializer::didAddInputPort(const String& id, const String& manufacturer, const String& name, const String& version, PortState state)
{
- ASSERT(m_accessor);
+ DCHECK(m_accessor);
m_portDescriptors.append(PortDescriptor(id, manufacturer, name, MIDIPort::TypeInput, version, state));
}
void MIDIAccessInitializer::didAddOutputPort(const String& id, const String& manufacturer, const String& name, const String& version, PortState state)
{
- ASSERT(m_accessor);
+ DCHECK(m_accessor);
m_portDescriptors.append(PortDescriptor(id, manufacturer, name, MIDIPort::TypeOutput, version, state));
}
@@ -89,18 +89,18 @@ void MIDIAccessInitializer::didSetInputPortState(unsigned portIndex, PortState s
// didSetInputPortState() is not allowed to call before didStartSession()
// is called. Once didStartSession() is called, MIDIAccessorClient methods
// are delegated to MIDIAccess. See constructor of MIDIAccess.
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
void MIDIAccessInitializer::didSetOutputPortState(unsigned portIndex, PortState state)
{
// See comments on didSetInputPortState().
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
void MIDIAccessInitializer::didStartSession(bool success, const String& error, const String& message)
{
- ASSERT(m_accessor);
+ DCHECK(m_accessor);
if (success) {
resolve(MIDIAccess::create(m_accessor.release(), m_options.hasSysex() && m_options.sysex(), m_portDescriptors, getExecutionContext()));
} else {
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp ('k') | third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698