Changeset 152459 in webkit


Ignore:
Timestamp:
Jul 8, 2013 11:33:32 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-07-08
Reviewed by Eric Carlson.

Merge https://src.chromium.org/viewvc/blink?revision=153206&view=revision

No new tests, only behavior change is preventing a crash in the release build.
cueIndex() is only used for sorting cues, so returning an invalidCueIndex in the case
where track()->cues() is null makes sense and won't modify behavior.

  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::cueIndex):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152456 r152459  
     12013-07-08  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 Eric Carlson.
     8
     9        Merge https://src.chromium.org/viewvc/blink?revision=153206&view=revision
     10       
     11        No new tests, only behavior change is preventing a crash in the release build.
     12        cueIndex() is only used for sorting cues, so returning an invalidCueIndex in the case
     13        where track()->cues() is null makes sense and won't modify behavior.
     14
     15        * html/track/TextTrackCue.cpp:
     16        (WebCore::TextTrackCue::cueIndex):
     17
    1182013-07-08  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/WebCore/html/track/TextTrackCue.cpp

    r151845 r152459  
    487487        ASSERT(track());
    488488        ASSERT(track()->cues());
    489         m_cueIndex = track()->cues()->getCueIndex(this);
     489        if (TextTrackCueList* cueList = track()->cues())
     490            m_cueIndex = cueList->getCueIndex(this);
    490491    }
    491492
Note: See TracChangeset for help on using the changeset viewer.