[Webkit-unassigned] [Bug 60184] Introduce HTML5 track list objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 19 11:27:24 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60184


Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #94076|review?                     |review+
               Flag|                            |




--- Comment #9 from Eric Carlson <eric.carlson at apple.com>  2011-05-19 11:27:24 PST ---
(From update of attachment 94076)
View in context: https://bugs.webkit.org/attachment.cgi?id=94076&action=review

> Source/WebCore/dom/ExclusiveTrackList.cpp:62
> +    if (index != NoSelection && !checkIndex(index, ec))
> +        return;
> +
> +    ASSERT(index >= NoSelection && index < static_cast<long>(length()));

Doesn't the checkIndex() test above mean that this ASSERT can never fire?


> Source/WebCore/dom/MultipleTrackList.cpp:67
> +    ASSERT(index < length());

Ditto.


> Source/WebCore/dom/MultipleTrackList.cpp:78
> +    ASSERT(index < length());

Ditto.


> Source/WebCore/dom/TrackList.cpp:78
> +bool TrackList::checkIndex(unsigned long index, ExceptionCode& ec) const
> +{
> +    if (index >= length()) {
> +        ec = INDEX_SIZE_ERR;
> +        return false;
> +    }
> +
> +    ec = 0;
> +    return true;
> +}

The spec says "If there is no such track, then the method must instead throw an INDEX_SIZE_ERR exception", so shouldn't this also fail if index is negative?

-- 
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