Changeset 186084 in webkit


Ignore:
Timestamp:
Jun 29, 2015 2:01:29 PM (9 years ago)
Author:
mrajca@apple.com
Message:

MediaSession: use a HashSet for the collection of participating elements
https://bugs.webkit.org/show_bug.cgi?id=146421

Reviewed by Eric Carlson.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::addMediaElement):
(WebCore::MediaSession::removeMediaElement):

  • Modules/mediasession/MediaSession.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r186083 r186084  
     12015-06-29  Matt Rajca  <mrajca@apple.com>
     2
     3        MediaSession: use a HashSet for the collection of participating elements
     4        https://bugs.webkit.org/show_bug.cgi?id=146421
     5
     6        Reviewed by Eric Carlson.
     7
     8        * Modules/mediasession/MediaSession.cpp:
     9        (WebCore::MediaSession::addMediaElement):
     10        (WebCore::MediaSession::removeMediaElement):
     11        * Modules/mediasession/MediaSession.h:
     12
    1132015-06-29  Dean Jackson  <dino@apple.com>
    214
  • trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp

    r186064 r186084  
    108108{
    109109    ASSERT(!m_participatingElements.contains(&element));
    110     m_participatingElements.append(&element);
     110    m_participatingElements.add(&element);
    111111}
    112112
     
    114114{
    115115    ASSERT(m_participatingElements.contains(&element));
    116     m_participatingElements.remove(m_participatingElements.find(&element));
     116    m_participatingElements.remove(&element);
    117117}
    118118
  • trunk/Source/WebCore/Modules/mediasession/MediaSession.h

    r186072 r186084  
    9393
    9494    State m_currentState { State::Idle };
    95     Vector<HTMLMediaElement*> m_participatingElements;
     95    HashSet<HTMLMediaElement*> m_participatingElements;
    9696    HashSet<HTMLMediaElement*> m_activeParticipatingElements;
    9797    HashSet<HTMLMediaElement*>* m_iteratedActiveParticipatingElements { nullptr };
Note: See TracChangeset for help on using the changeset viewer.