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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp

Issue 2159403002: Replace ASSERT with DCHECK in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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/webaudio/OscillatorNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
index ebbbd47265b526d9a3d435da77622b4d42e6a681..4e0ec6a716d5fe19ac0c3d765c3dda4942182e3a 100644
--- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
@@ -136,7 +136,7 @@ bool OscillatorHandler::setType(unsigned type)
bool OscillatorHandler::calculateSampleAccuratePhaseIncrements(size_t framesToProcess)
{
bool isGood = framesToProcess <= m_phaseIncrements.size() && framesToProcess <= m_detuneValues.size();
- ASSERT(isGood);
+ DCHECK(isGood);
if (!isGood)
return false;
@@ -208,7 +208,7 @@ void OscillatorHandler::process(size_t framesToProcess)
return;
}
- ASSERT(framesToProcess <= m_phaseIncrements.size());
+ DCHECK_LE(framesToProcess, m_phaseIncrements.size());
if (framesToProcess > m_phaseIncrements.size())
return;
@@ -241,7 +241,7 @@ void OscillatorHandler::process(size_t framesToProcess)
float* destP = outputBus->channel(0)->mutableData();
- ASSERT(quantumFrameOffset <= framesToProcess);
+ DCHECK_LE(quantumFrameOffset, framesToProcess);
// We keep virtualReadIndex double-precision since we're accumulating values.
double virtualReadIndex = m_virtualReadIndex;
@@ -314,8 +314,8 @@ void OscillatorHandler::process(size_t framesToProcess)
void OscillatorHandler::setPeriodicWave(PeriodicWave* periodicWave)
{
- ASSERT(isMainThread());
- ASSERT(periodicWave);
+ DCHECK(isMainThread());
+ DCHECK(periodicWave);
// This synchronizes with process().
MutexLocker processLocker(m_processLock);

Powered by Google App Engine
This is Rietveld 408576698