Changeset 185560 in webkit


Ignore:
Timestamp:
Jun 15, 2015 11:55:39 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Media Session: Active participating elements can change while being iterated
https://bugs.webkit.org/show_bug.cgi?id=145978

Patch by Matt Rajca <mrajca@apple.com> on 2015-06-15
Reviewed by Alex Christensen.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents

can be modified in the loop.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185558 r185560  
     12015-06-15  Matt Rajca  <mrajca@apple.com>
     2
     3        Media Session: Active participating elements can change while being iterated
     4        https://bugs.webkit.org/show_bug.cgi?id=145978
     5
     6        Reviewed by Alex Christensen.
     7
     8        * Modules/mediasession/MediaSession.cpp:
     9        (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
     10          can be modified in the loop.
     11
    1122015-06-15  Chris Fleizach  <cfleizach@apple.com>
    213
  • trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp

    r185514 r185560  
    9595void MediaSession::togglePlayback()
    9696{
    97     for (auto* element : m_activeParticipatingElements) {
     97    HashSet<HTMLMediaElement*> activeParticipatingElementsCopy = m_activeParticipatingElements;
     98
     99    for (auto* element : activeParticipatingElementsCopy) {
    98100        if (element->paused())
    99101            element->play();
Note: See TracChangeset for help on using the changeset viewer.