Changeset 211386 in webkit


Ignore:
Timestamp:
Jan 30, 2017 2:09:01 PM (7 years ago)
Author:
jer.noble@apple.com
Message:

NULL-deref crash at PlatformMediaSession::endInterruption
https://bugs.webkit.org/show_bug.cgi?id=167595

Reviewed by Eric Carlson.

Use the same, NULL-aware forEachSession() iterator rather than iterating over m_sessions directly.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::beginInterruption):
(WebCore::PlatformMediaSessionManager::endInterruption):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211382 r211386  
     12017-01-30  Jer Noble  <jer.noble@apple.com>
     2
     3        NULL-deref crash at PlatformMediaSession::endInterruption
     4        https://bugs.webkit.org/show_bug.cgi?id=167595
     5
     6        Reviewed by Eric Carlson.
     7
     8        Use the same, NULL-aware forEachSession() iterator rather than iterating over m_sessions directly.
     9
     10        * platform/audio/PlatformMediaSessionManager.cpp:
     11        (WebCore::PlatformMediaSessionManager::beginInterruption):
     12        (WebCore::PlatformMediaSessionManager::endInterruption):
     13
    1142017-01-30  Myles C. Maxfield  <mmaxfield@apple.com>
    215
  • trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp

    r210828 r211386  
    113113
    114114    m_interrupted = true;
    115     Vector<PlatformMediaSession*> sessions = m_sessions;
    116     for (auto* session : sessions)
    117         session->beginInterruption(type);
     115    forEachSession([type] (PlatformMediaSession& session, size_t) {
     116        session.beginInterruption(type);
     117    });
    118118    updateSessionState();
    119119}
     
    124124
    125125    m_interrupted = false;
    126     Vector<PlatformMediaSession*> sessions = m_sessions;
    127     for (auto* session : sessions)
    128         session->endInterruption(flags);
     126    forEachSession([flags] (PlatformMediaSession& session, size_t) {
     127        session.endInterruption(flags);
     128    });
    129129}
    130130
Note: See TracChangeset for help on using the changeset viewer.