[Webkit-unassigned] [Bug 133298] Add mock DTMFSender support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 30 11:58:53 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133298


Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #232282|review?, commit-queue?      |review+
               Flag|                            |




--- Comment #5 from Eric Carlson <eric.carlson at apple.com>  2014-05-30 11:59:15 PST ---
(From update of attachment 232282)
View in context: https://bugs.webkit.org/attachment.cgi?id=232282&action=review

> Source/WebCore/platform/mock/RTCDTMFSenderHandlerMock.cpp:55
> +        while (m_toneBuffer.length() > 0) {
> +            m_client->didPlayTone(m_toneBuffer.substring(0, 1));
> +            m_toneBuffer.remove(0, 1);
> +        }

This is an extremely inefficient way to do this. If this processing was done asynchronously it would be necessary to modify m_toneBuffer each time through the loop, but nothing can access m_toneBuffer while this runs so something like this would be better:

    for (size_t i = 0; i < m_toneBuffer.length(); ++i)
        m_client->didPlayTone(m_toneBuffer[i]);
    m_toneBuffer = emptyString();
    m_client->didPlayTone(emptyString());

> Source/WebCore/platform/mock/RTCDTMFSenderHandlerMock.cpp:56
> +        if (m_toneBuffer.isEmpty())

Why this test, m_toneBuffer is empty because you just emptied it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list