Changeset 151845 in webkit


Ignore:
Timestamp:
Jun 21, 2013 11:08:06 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>

Patch by Ruth Fong <ruth_fong@apple.com> on 2013-06-21
Reviewed by Ryosuke Niwa.

This patch adds assert statements to try to catch when
track()->cues() returns a null pointer.

  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::cueIndex):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151844 r151845  
     12013-06-21  Ruth Fong  <ruth_fong@apple.com>
     2
     3        Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
     4        https://bugs.webkit.org/show_bug.cgi?id=117815
     5        <rdar://problem/14211041>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        This patch adds assert statements to try to catch when
     10        track()->cues() returns a null pointer.
     11
     12        * html/track/TextTrackCue.cpp:
     13        (WebCore::TextTrackCue::cueIndex):
     14
    1152013-06-21  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/html/track/TextTrackCue.cpp

    r151754 r151845  
    484484int TextTrackCue::cueIndex()
    485485{
    486     if (m_cueIndex == invalidCueIndex)
     486    if (m_cueIndex == invalidCueIndex) {
     487        ASSERT(track());
     488        ASSERT(track()->cues());
    487489        m_cueIndex = track()->cues()->getCueIndex(this);
     490    }
    488491
    489492    return m_cueIndex;
Note: See TracChangeset for help on using the changeset viewer.