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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioContext.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/AudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
index aaffd81ead1abd37038550f75deead035ba0b925..34fbb62d5d6206ddbd4eaa72e96809c54e87f2f7 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
@@ -28,7 +28,7 @@ static unsigned s_contextId = 0;
BaseAudioContext* AudioContext::create(Document& document, ExceptionState& exceptionState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
UseCounter::countCrossOriginIframe(document, UseCounter::AudioContextCrossOriginIframe);
@@ -102,7 +102,7 @@ DEFINE_TRACE(AudioContext)
ScriptPromise AudioContext::suspendContext(ScriptState* scriptState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
AutoLocker locker(this);
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
@@ -126,7 +126,7 @@ ScriptPromise AudioContext::suspendContext(ScriptState* scriptState)
ScriptPromise AudioContext::resumeContext(ScriptState* scriptState)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
if (isContextClosed()) {
return ScriptPromise::rejectWithDOMException(
@@ -187,7 +187,7 @@ void AudioContext::didClose()
// are closed in their completion event.
setContextState(Closed);
- ASSERT(s_hardwareContextCount);
+ DCHECK(s_hardwareContextCount);
--s_hardwareContextCount;
if (m_closeResolver)
@@ -201,8 +201,8 @@ bool AudioContext::isContextClosed() const
void AudioContext::stopRendering()
{
- ASSERT(isMainThread());
- ASSERT(destination());
+ DCHECK(isMainThread());
+ DCHECK(destination());
if (contextState() == Running) {
destination()->audioDestinationHandler().stopRendering();

Powered by Google App Engine
This is Rietveld 408576698