Changeset 230584 in webkit


Ignore:
Timestamp:
Apr 12, 2018 11:01:58 AM (6 years ago)
Author:
aboya@igalia.com
Message:

[MSE] Add isValid() assertions on PlatformTimeRanges::add() range ends
https://bugs.webkit.org/show_bug.cgi?id=180253

Right now it's checked that start <= end but it's not checked that
neither of them is undefined.

When this happens, the bug can be hard to track down.

The assertion is not enabled for Mac because there is currently a test
that is hitting it.

Reviewed by Jer Noble.

  • platform/graphics/PlatformTimeRanges.cpp:

(WebCore::PlatformTimeRanges::add):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r230583 r230584  
     12018-04-12  Alicia Boya García  <aboya@igalia.com>
     2
     3        [MSE] Add isValid() assertions on PlatformTimeRanges::add() range ends
     4        https://bugs.webkit.org/show_bug.cgi?id=180253
     5
     6        Right now it's checked that start <= end but it's not checked that
     7        neither of them is undefined.
     8
     9        When this happens, the bug can be hard to track down.
     10
     11        The assertion is not enabled for Mac because there is currently a test
     12        that is hitting it.
     13
     14        Reviewed by Jer Noble.
     15
     16        * platform/graphics/PlatformTimeRanges.cpp:
     17        (WebCore::PlatformTimeRanges::add):
     18
    1192018-04-12  Chris Dumez  <cdumez@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/PlatformTimeRanges.cpp

    r206001 r230584  
    135135void PlatformTimeRanges::add(const MediaTime& start, const MediaTime& end)
    136136{
     137#if !PLATFORM(MAC) // https://bugs.webkit.org/show_bug.cgi?id=180253
     138    ASSERT(start.isValid());
     139    ASSERT(end.isValid());
     140#endif
    137141    ASSERT(start <= end);
     142
    138143    unsigned overlappingArcIndex;
    139144    Range addedRange(start, end);
Note: See TracChangeset for help on using the changeset viewer.