+2017-08-09 Ms2ger <Ms2ger@igalia.com>
+
+ 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 <cdumez@apple.com>
Reinstate active flag for iterators
{
LOG(Media, "PlatformMediaSessionManager::applicationWillBecomeInactive");
- Vector<PlatformMediaSession*> sessions = m_sessions;
forEachSession([&] (PlatformMediaSession& session, size_t) {
if (m_restrictions[session.mediaType()] & InactiveProcessPlaybackRestricted)
session.beginInterruption(PlatformMediaSession::ProcessInactive);
{
LOG(Media, "PlatformMediaSessionManager::applicationDidBecomeActive");
- Vector<PlatformMediaSession*> sessions = m_sessions;
forEachSession([&] (PlatformMediaSession& session, size_t) {
if (m_restrictions[session.mediaType()] & InactiveProcessPlaybackRestricted)
session.endInterruption(PlatformMediaSession::MayResumePlaying);
return;
m_isApplicationInBackground = true;
-
- Vector<PlatformMediaSession*> sessions = m_sessions;
+
forEachSession([&] (PlatformMediaSession& session, size_t) {
if (suspendedUnderLock && m_restrictions[session.mediaType()] & SuspendedUnderLockPlaybackRestricted)
session.beginInterruption(PlatformMediaSession::SuspendedUnderLock);
m_isApplicationInBackground = false;
- Vector<PlatformMediaSession*> sessions = m_sessions;
forEachSession([&] (PlatformMediaSession& session, size_t) {
if ((suspendedUnderLock && m_restrictions[session.mediaType()] & SuspendedUnderLockPlaybackRestricted) || m_restrictions[session.mediaType()] & BackgroundProcessPlaybackRestricted)
session.endInterruption(PlatformMediaSession::MayResumePlaying);