[webkit-changes] [WebKit/WebKit] c020c7: [WTF] MediaTime: compute flags on multiplication w...

Alicia Boya García noreply at github.com
Wed Oct 19 16:27:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c020c7e213d81d1a8d3b05f7309906313cafe624
      https://github.com/WebKit/WebKit/commit/c020c7e213d81d1a8d3b05f7309906313cafe624
  Author: Alicia Boya Garcia <aboya at igalia.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M Source/WTF/wtf/MediaTime.cpp
    M Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp

  Log Message:
  -----------
  [WTF] MediaTime: compute flags on multiplication with doubles
https://bugs.webkit.org/show_bug.cgi?id=246746

Reviewed by Yusuke Suzuki.

The current multiplication algorithm in WTF::MediaTime updates the time
value without updating the flags. This becomes a problem if the
multiplication promotes the number to infinity.

This patch fixes this problem and adds a test for it.

* Source/WTF/wtf/MediaTime.cpp:
(WTF::MediaTime::operator* const):
* Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/255767@main




More information about the webkit-changes mailing list