diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 9c6acc735b8a..9b54ce1716f2 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2017-08-09 Ms2ger + + Remove unnecessary copies of PlatformMediaSessionManager::m_sessions + https://bugs.webkit.org/show_bug.cgi?id=175375 + + Reviewed by Sam Weinig. + + Remove unnecessary copies of PlatformMediaSessionManager::m_sessions. + + These should have been removed in r207688. + + No new tests: no behavior change. + + * platform/audio/PlatformMediaSessionManager.cpp: + (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const): + (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const): + (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const): + (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const): + 2017-08-09 Chris Dumez Reinstate active flag for iterators diff --git a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp index 59d0314a50bf..2fec28114158 100644 --- a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp +++ b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp @@ -298,7 +298,6 @@ void PlatformMediaSessionManager::applicationWillBecomeInactive() const { LOG(Media, "PlatformMediaSessionManager::applicationWillBecomeInactive"); - Vector sessions = m_sessions; forEachSession([&] (PlatformMediaSession& session, size_t) { if (m_restrictions[session.mediaType()] & InactiveProcessPlaybackRestricted) session.beginInterruption(PlatformMediaSession::ProcessInactive); @@ -309,7 +308,6 @@ void PlatformMediaSessionManager::applicationDidBecomeActive() const { LOG(Media, "PlatformMediaSessionManager::applicationDidBecomeActive"); - Vector sessions = m_sessions; forEachSession([&] (PlatformMediaSession& session, size_t) { if (m_restrictions[session.mediaType()] & InactiveProcessPlaybackRestricted) session.endInterruption(PlatformMediaSession::MayResumePlaying); @@ -324,8 +322,7 @@ void PlatformMediaSessionManager::applicationDidEnterBackground(bool suspendedUn return; m_isApplicationInBackground = true; - - Vector sessions = m_sessions; + forEachSession([&] (PlatformMediaSession& session, size_t) { if (suspendedUnderLock && m_restrictions[session.mediaType()] & SuspendedUnderLockPlaybackRestricted) session.beginInterruption(PlatformMediaSession::SuspendedUnderLock); @@ -343,7 +340,6 @@ void PlatformMediaSessionManager::applicationWillEnterForeground(bool suspendedU m_isApplicationInBackground = false; - Vector sessions = m_sessions; forEachSession([&] (PlatformMediaSession& session, size_t) { if ((suspendedUnderLock && m_restrictions[session.mediaType()] & SuspendedUnderLockPlaybackRestricted) || m_restrictions[session.mediaType()] & BackgroundProcessPlaybackRestricted) session.endInterruption(PlatformMediaSession::MayResumePlaying);