Commit e7f59bab authored by haraken@chromium.org's avatar haraken@chromium.org

AudioNode::breakConnectionWithLock() doesn't need to check 'm_normalRefCount >...

AudioNode::breakConnectionWithLock() doesn't need to check 'm_normalRefCount > 1' in non-oilpan builds

This check was introduced in https://codereview.chromium.org/386403002/.
I agree that it's OK to have the check, but the check is not needed.
If we have the check, we can avoid the overhead of calling disableOutputsIfNecessary()
when the AudioNode is about to die. However, having the check causes an issue
when rewriting the reference counting system (see full CL: https://codereview.chromium.org/438293003/),
I remove the check in this CL in preparation for the rewrite.

BUG=340522

Review URL: https://codereview.chromium.org/466763002

git-svn-id: svn://svn.chromium.org/blink/trunk@180233 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8886de05
...@@ -587,16 +587,12 @@ void AudioNode::breakConnection() ...@@ -587,16 +587,12 @@ void AudioNode::breakConnection()
void AudioNode::breakConnectionWithLock() void AudioNode::breakConnectionWithLock()
{ {
#if ENABLE(OILPAN)
atomicDecrement(&m_connectionRefCount); atomicDecrement(&m_connectionRefCount);
if (m_connectionRefCount == 0) #if !ENABLE(OILPAN)
disableOutputsIfNecessary();
#else
ASSERT(m_normalRefCount > 0); ASSERT(m_normalRefCount > 0);
atomicDecrement(&m_connectionRefCount);
if (m_connectionRefCount == 0 && m_normalRefCount > 1)
disableOutputsIfNecessary();
#endif #endif
if (!m_connectionRefCount)
disableOutputsIfNecessary();
} }
#if !ENABLE(OILPAN) #if !ENABLE(OILPAN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment