[Webkit-unassigned] [Bug 151632] [GTK] Remove the remaining uses of GMainLoopSource

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 27 06:00:29 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151632

--- Comment #3 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 266196
  --> https://bugs.webkit.org/attachment.cgi?id=266196
Patch

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

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:714
> +        WTF::GMutexLocker<GMutex>* lock;

This can be a simple reference instead of a pointer.

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:719
> +            auto* context = static_cast<UnlockServerSourceContext*>(userData);

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

> 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());

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151127/2dff7d4f/attachment.html>


More information about the webkit-unassigned mailing list