Changeset 220504 in webkit


Ignore:
Timestamp:
Aug 9, 2017 7:11:47 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
https://bugs.webkit.org/show_bug.cgi?id=175399
rdar://problem/33663344

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-08-09
Reviewed by Eric Carlson.

Invalidate PlaybackSessionManager when WebPage is destructed.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::~WebPage):

  • WebProcess/cocoa/PlaybackSessionManager.h:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::~PlaybackSessionManager):
(WebKit::PlaybackSessionManager::invalidate):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220503 r220504  
     12017-08-09  Jeremy Jones  <jeremyj@apple.com>
     2
     3        Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
     4        https://bugs.webkit.org/show_bug.cgi?id=175399
     5        rdar://problem/33663344
     6
     7        Reviewed by Eric Carlson.
     8
     9        Invalidate PlaybackSessionManager when WebPage is destructed.
     10
     11        * WebProcess/WebPage/WebPage.cpp:
     12        (WebKit::WebPage::~WebPage):
     13        * WebProcess/cocoa/PlaybackSessionManager.h:
     14        * WebProcess/cocoa/PlaybackSessionManager.mm:
     15        (WebKit::PlaybackSessionManager::~PlaybackSessionManager):
     16        (WebKit::PlaybackSessionManager::invalidate):
     17
    1182017-08-09  Don Olmstead  <don.olmstead@sony.com>
    219
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r220443 r220504  
    674674   
    675675#if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
     676    if (m_playbackSessionManager)
     677        m_playbackSessionManager->invalidate();
     678
    676679    if (m_videoFullscreenManager)
    677680        m_videoFullscreenManager->invalidate();
  • trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h

    r219996 r220504  
    100100    static Ref<PlaybackSessionManager> create(WebPage&);
    101101    virtual ~PlaybackSessionManager();
     102   
     103    void invalidate();
    102104
    103105    void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
  • trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm

    r219996 r220504  
    185185    m_clientCounts.clear();
    186186
     187    if (m_page)
     188        WebProcess::singleton().removeMessageReceiver(Messages::PlaybackSessionManager::messageReceiverName(), m_page->pageID());
     189}
     190
     191void PlaybackSessionManager::invalidate()
     192{
     193    ASSERT(m_page);
    187194    WebProcess::singleton().removeMessageReceiver(Messages::PlaybackSessionManager::messageReceiverName(), m_page->pageID());
     195    m_page = nullptr;
    188196}
    189197
Note: See TracChangeset for help on using the changeset viewer.