⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 233557 in webkit


Ignore:
Timestamp:
Jul 5, 2018, 7:32:52 PM (8 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION(r233496): Crash in WebCore::VideoTrack::clearClient()
​https://bugs.webkit.org/show_bug.cgi?id=187377

Reviewed by Simon Fraser.

Clear m_client of an audio track or a video track before removing it from the list
since TrackListBase::m_inbandTracks may hold the last ref to the track.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removeAudioTrack):
(WebCore::HTMLMediaElement::removeVideoTrack):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r233556 r233557  
     12018-07-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r233496): Crash in WebCore::VideoTrack::clearClient()
     4        https://bugs.webkit.org/show_bug.cgi?id=187377
     5
     6        Reviewed by Simon Fraser.
     7
     8        Clear m_client of an audio track or a video track before removing it from the list
     9        since TrackListBase::m_inbandTracks may hold the last ref to the track.
     10
     11        * html/HTMLMediaElement.cpp:
     12        (WebCore::HTMLMediaElement::removeAudioTrack):
     13        (WebCore::HTMLMediaElement::removeVideoTrack):
     14
    1152018-07-05  Fujii Hironori  <Hironori.Fujii@sony.com>
    216
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r233549 r233557  
    40504050void HTMLMediaElement::removeAudioTrack(AudioTrack& track)
    40514051{
     4052    track.clearClient();
    40524053    m_audioTracks->remove(track);
    4053     track.clearClient();
    40544054}
    40554055
    … …  
    40684068void HTMLMediaElement::removeVideoTrack(VideoTrack& track)
    40694069{
     4070    track.clearClient();
    40704071    m_videoTracks->remove(track);
    4071     track.clearClient();
    40724072}
    40734073
Note: See TracChangeset for help on using the changeset viewer.