[Webkit-unassigned] [Bug 146132] Support releasing media sessions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 19 11:23:43 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=146132
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #255155|review? |review+
Flags| |
--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 255155
--> https://bugs.webkit.org/attachment.cgi?id=255155
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=255155&action=review
> Source/WebCore/Modules/mediasession/MediaSession.cpp:84
> + while (!m_activeParticipatingElements.isEmpty()) {
> + HTMLMediaElement* element = m_activeParticipatingElements.takeAny();
> + element->pause();
> + }
Could write this without the local variable:
while (!m_activeParticipatingElements.isEmpty())
m_activeParticipatingElements.takeAny()->pause();
> Source/WebCore/Modules/mediasession/MediaSession.cpp:98
> + if (m_activeParticipatingElements.size() >= 1)
I think !isEmpty() would be better. Sometimes itâs better not to take specification language too literally! One or more doesnât have to turn into >= 1.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150619/ca78ff25/attachment.html>
More information about the webkit-unassigned
mailing list