[Webkit-unassigned] [Bug 117815] Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 2 10:14:12 PDT 2013


--- Comment #11 from Ruth Fong <ruthiecftg at gmail.com>  2013-07-02 10:16:10 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > Consider merging: https://src.chromium.org/viewvc/blink?revision=153206&view=revision
> Could there ever be a case in which tracks() is null?

track() not tracks() and I think yes.

>From W3 spec on TextTrackCue: 
"The track attribute, on getting, must return the TextTrack object of the text track in whose list of cues the text track cue that the TextTrackCue object represents finds itself, if any; or null otherwise."

Also, by inspection of the implementation of TextTrackCue::track(), the getter returns m_track, which is a pointer to a TextTrack object and initialized to null in the constructor.

If so, then track() should first be checked for a null value before track()->cues(). In the case where track() is null, would it also be appropriate to return invalidCueIndex? Or is this a case that really should never be hit?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list