<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&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=266196&amp;action=diff" name="attach_266196" title="Patch">attachment 266196</a> <a href="attachment.cgi?id=266196&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=266196&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=266196&amp;action=review</a>

<span class="quote">&gt; Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:714
&gt; +        WTF::GMutexLocker&lt;GMutex&gt;* lock;</span >

This can be a simple reference instead of a pointer.

<span class="quote">&gt; Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:719
&gt; +            auto* context = static_cast&lt;UnlockServerSourceContext*&gt;(userData);</span >

You can dereference the casted user data immediately and bind it to a reference (auto&amp;), instead of a pointer.

<span class="quote">&gt; Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp:80
&gt; +        g_source_set_ready_time(timeoutSource(), g_get_monotonic_time() + std::chrono::duration_cast&lt;std::chrono::microseconds&gt;(std::chrono::duration&lt;double&gt;(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>