Changeset 246754 in webkit


Ignore:
Timestamp:
Jun 24, 2019 12:32:03 PM (5 years ago)
Author:
pvollan@apple.com
Message:

[Cocoa] Avoid creating a PlatformMediaSessionManager when the WebProcess is suspended or resumed
https://bugs.webkit.org/show_bug.cgi?id=199160

Reviewed by Brent Fulgham.

When the WebProcess suspends or resumes, the PlatformMediaSessionManager is notified about this.
Avoid creating a new PlatformMediaSessionManager if it does not already exist.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::actualPrepareToSuspend):
(WebKit::WebProcess::cancelPrepareToSuspend):
(WebKit::WebProcess::processDidResume):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246734 r246754  
     12019-06-24  Per Arne Vollan  <pvollan@apple.com>
     2
     3        [Cocoa] Avoid creating a PlatformMediaSessionManager when the WebProcess is suspended or resumed
     4        https://bugs.webkit.org/show_bug.cgi?id=199160
     5
     6        Reviewed by Brent Fulgham.
     7
     8        When the WebProcess suspends or resumes, the PlatformMediaSessionManager is notified about this.
     9        Avoid creating a new PlatformMediaSessionManager if it does not already exist.
     10
     11        * WebProcess/WebProcess.cpp:
     12        (WebKit::WebProcess::actualPrepareToSuspend):
     13        (WebKit::WebProcess::cancelPrepareToSuspend):
     14        (WebKit::WebProcess::processDidResume):
     15
    1162019-06-24  Adrian Perez de Castro  <aperez@igalia.com>
    217
  • trunk/Source/WebKit/WebProcess/WebProcess.cpp

    r246452 r246754  
    14741474#if ENABLE(VIDEO)
    14751475    suspendAllMediaBuffering();
    1476     PlatformMediaSessionManager::sharedManager().processWillSuspend();
     1476    if (auto* platformMediaSessionManager = PlatformMediaSessionManager::sharedManagerIfExists())
     1477        platformMediaSessionManager->processWillSuspend();
    14771478#endif
    14781479
     
    15361537
    15371538#if ENABLE(VIDEO)
    1538     PlatformMediaSessionManager::sharedManager().processDidResume();
     1539    if (auto* platformMediaSessionManager = PlatformMediaSessionManager::sharedManagerIfExists())
     1540        platformMediaSessionManager->processDidResume();
    15391541    resumeAllMediaBuffering();
    15401542#endif
     
    16121614
    16131615#if ENABLE(VIDEO)
    1614     PlatformMediaSessionManager::sharedManager().processDidResume();
     1616    if (auto* platformMediaSessionManager = PlatformMediaSessionManager::sharedManagerIfExists())
     1617        platformMediaSessionManager->processDidResume();
    16151618    resumeAllMediaBuffering();
    16161619#endif
Note: See TracChangeset for help on using the changeset viewer.