Changeset 230292 in webkit


Ignore:
Timestamp:
Apr 4, 2018 7:40:49 PM (6 years ago)
Author:
youenn@apple.com
Message:

webrtc/video-update-often.html is flakily crashing on iOS simulator Debug
https://bugs.webkit.org/show_bug.cgi?id=184022

Reviewed by Jer Noble.

Remove client context once the new context identifier is set.
Covered by test no longer crashing locally.

  • WebProcess/cocoa/PlaybackSessionManager.mm:

(WebKit::PlaybackSessionManager::setUpPlaybackControlsManager):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r230290 r230292  
     12018-04-04  Youenn Fablet  <youenn@apple.com>
     2
     3        webrtc/video-update-often.html is flakily crashing on iOS simulator Debug
     4        https://bugs.webkit.org/show_bug.cgi?id=184022
     5
     6        Reviewed by Jer Noble.
     7
     8        Remove client context once the new context identifier is set.
     9        Covered by test no longer crashing locally.
     10
     11        * WebProcess/cocoa/PlaybackSessionManager.mm:
     12        (WebKit::PlaybackSessionManager::setUpPlaybackControlsManager):
     13
    1142018-04-04  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm

    r229485 r230292  
    257257            return;
    258258
    259         if (m_controlsManagerContextId)
    260             removeClientForContext(m_controlsManagerContextId);
     259        auto previousContextId = m_controlsManagerContextId;
    261260        m_controlsManagerContextId = contextId;
     261        if (previousContextId)
     262            removeClientForContext(previousContextId);
    262263    } else {
    263         auto addResult = m_mediaElements.ensure(&mediaElement, [&] { return nextContextId(); });
    264         auto contextId = addResult.iterator->value;
    265         if (m_controlsManagerContextId)
    266             removeClientForContext(m_controlsManagerContextId);
     264        auto contextId = m_mediaElements.ensure(&mediaElement, [&] { return nextContextId(); }).iterator->value;
     265
     266        auto previousContextId = m_controlsManagerContextId;
    267267        m_controlsManagerContextId = contextId;
     268        if (previousContextId)
     269            removeClientForContext(previousContextId);
     270
    268271        ensureModel(contextId).setMediaElement(&mediaElement);
    269272    }
Note: See TracChangeset for help on using the changeset viewer.