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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.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/AudioScheduledSourceNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
index 10d9283668e155d91e5f701f5008eb32890010fe..09ce2461f755407b9bfadb3f283abb030d35458a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
@@ -47,11 +47,11 @@ AudioScheduledSourceHandler::AudioScheduledSourceHandler(NodeType nodeType, Audi
void AudioScheduledSourceHandler::updateSchedulingInfo(
size_t quantumFrameSize, AudioBus* outputBus, size_t& quantumFrameOffset, size_t& nonSilentFramesToProcess)
{
- ASSERT(outputBus);
+ DCHECK(outputBus);
if (!outputBus)
return;
- ASSERT(quantumFrameSize == ProcessingSizeInFrames);
+ DCHECK_EQ(quantumFrameSize, static_cast<size_t>(ProcessingSizeInFrames));
if (quantumFrameSize != ProcessingSizeInFrames)
return;
@@ -110,7 +110,7 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
size_t framesToZero = quantumFrameSize - zeroStartFrame;
bool isSafe = zeroStartFrame < quantumFrameSize && framesToZero <= quantumFrameSize && zeroStartFrame + framesToZero <= quantumFrameSize;
- ASSERT(isSafe);
+ DCHECK(isSafe);
if (isSafe) {
if (framesToZero > nonSilentFramesToProcess)
@@ -130,7 +130,7 @@ void AudioScheduledSourceHandler::updateSchedulingInfo(
void AudioScheduledSourceHandler::start(double when, ExceptionState& exceptionState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
context()->recordUserGestureState();
@@ -169,7 +169,7 @@ void AudioScheduledSourceHandler::start(double when, ExceptionState& exceptionSt
void AudioScheduledSourceHandler::stop(double when, ExceptionState& exceptionState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
if (playbackState() == UNSCHEDULED_STATE) {
exceptionState.throwDOMException(
@@ -218,7 +218,7 @@ void AudioScheduledSourceHandler::finish()
void AudioScheduledSourceHandler::notifyEnded()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
if (node())
node()->dispatchEvent(Event::create(EventTypeNames::ended));
}

Powered by Google App Engine
This is Rietveld 408576698