[Webkit-unassigned] [Bug 119482] Waste work in MediaController() and ArrayBuffer()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 3 16:56:41 PST 2014


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





--- Comment #5 from Eric Carlson <eric.carlson at apple.com>  2014-03-03 16:53:44 PST ---
(From update of attachment 208106)
View in context: https://bugs.webkit.org/attachment.cgi?id=208106&action=review

> WebCore/html/MediaController.cpp:534
>      bool allHaveEnded = true;
>      for (size_t index = 0; index < m_mediaElements.size(); ++index) {
> -        if (!m_mediaElements[index]->ended())
> +        if (!m_mediaElements[index]->ended()) {
>              allHaveEnded = false;
> +            break;
> +        }
>      }
>      return allHaveEnded;

Actually, we can do away with the variable completely and just "return false" when the loop finds an element that hasn't ended, and "return true" if the loop completes.

-- 
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