Remove unnecessary copies of PlatformMediaSessionManager::m_sessions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Aug 2017 13:06:11 +0000 (13:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Aug 2017 13:06:11 +0000 (13:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175375

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-09
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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220454 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp

index 9c6acc7..9b54ce1 100644 (file)
@@ -1,3 +1,22 @@
+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
index 59d0314..2fec281 100644 (file)
@@ -298,7 +298,6 @@ void PlatformMediaSessionManager::applicationWillBecomeInactive() const
 {
     LOG(Media, "PlatformMediaSessionManager::applicationWillBecomeInactive");
 
-    Vector<PlatformMediaSession*> 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<PlatformMediaSession*> 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<PlatformMediaSession*> 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<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);