<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Remove the remaining uses of GMainLoopSource"
href="https://bugs.webkit.org/show_bug.cgi?id=151632#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Remove the remaining uses of GMainLoopSource"
href="https://bugs.webkit.org/show_bug.cgi?id=151632">bug 151632</a>
from <span class="vcard"><a class="email" href="mailto:zan@falconsigh.net" title="Zan Dobersek <zan@falconsigh.net>"> <span class="fn">Zan Dobersek</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=266196&action=diff" name="attach_266196" title="Patch">attachment 266196</a> <a href="attachment.cgi?id=266196&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=266196&action=review">https://bugs.webkit.org/attachment.cgi?id=266196&action=review</a>
<span class="quote">> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:714
> + WTF::GMutexLocker<GMutex>* lock;</span >
This can be a simple reference instead of a pointer.
<span class="quote">> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:719
> + auto* context = static_cast<UnlockServerSourceContext*>(userData);</span >
You can dereference the casted user data immediately and bind it to a reference (auto&), instead of a pointer.
<span class="quote">> Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp:80
> + g_source_set_ready_time(timeoutSource(), g_get_monotonic_time() + std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(timeout)).count());</span >
That summation can overflow. It likely won't, but it's possible. Also, using std::chrono also maybe isn't a requirement here, G_USEC_PER_SEC would work just fine.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>