[webkit-reviews] review granted: [Bug 189349] [GTK] Several media related tests timing out around the same revision : [Attachment 349163] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 9 23:43:55 PDT 2018


Carlos Garcia Campos <cgarcia at igalia.com> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 189349: [GTK] Several media related tests timing out around the same
revision
https://bugs.webkit.org/show_bug.cgi?id=189349

Attachment 349163: Patch

https://bugs.webkit.org/attachment.cgi?id=349163&action=review




--- Comment #10 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 349163
  --> https://bugs.webkit.org/attachment.cgi?id=349163
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=349163&action=review

> Source/WebCore/ChangeLog:3
> +	   [GTK] Several media related tests timing out around the same
revision

Why is this GTK specific?

>
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:348
> -    if (m_lastQuery > -1 && ((now - m_lastQuery) < 300) &&
m_cachedPosition.isValid())
> +    if (m_lastQuery > -1 && ((now - m_lastQuery) < 200) &&
m_cachedPosition.isValid())

This would be easier to read if m_lastQuery was a std::optional<Seconds> (and
probably renamed to m_lastQuertTime) and now was Seconds too. I would also
avoid the magic number, giving 200 a name:

static const Seconds positionCacheThreshold = 200_ms;
Seconds now = WTF::WallTime::now().secondsSinceEpoch();
if (m_lastQueryTime && (now - m_lastQueryTime.value()) < positionCacheThreshold
&& m_cachedPosition.isValid())

something like that


More information about the webkit-reviews mailing list