Bug 150772 - [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
Summary: [GLIB] Remove support for GSocket main loop sources from GMainLoopSource
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 150771
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-01 03:42 PST by Carlos Garcia Campos
Modified: 2015-11-02 01:34 PST (History)
1 user (show)

See Also:


Attachments
Patch (19.99 KB, patch)
2015-11-01 03:46 PST, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2015-11-01 03:42:31 PST
It complicated the code just to make generic what is only used in one place.
Comment 1 Carlos Garcia Campos 2015-11-01 03:46:45 PST
Created attachment 264512 [details]
Patch
Comment 2 Zan Dobersek 2015-11-01 22:20:50 PST
Comment on attachment 264512 [details]
Patch

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

> Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h:33
> +#include <glib.h>
> +#include <wtf/Forward.h>
> +#include <wtf/Noncopyable.h>
> +#include <wtf/RunLoop.h>
> +#include <wtf/glib/GRefPtr.h>

Also include <functional>, for std::function<>.

> Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h:40
> +    WTF_MAKE_NONCOPYABLE(GSocketMonitor); WTF_MAKE_FAST_ALLOCATED;

No need for WTF_MAKE_FAST_ALLOCATED -- `new GSocketMonitor` is never called anyway.

> Source/WebKit2/Platform/IPC/glib/GSocketMonitor.h:45
> +    void start(GSocket*, GIOCondition, RunLoop&, std::function<gboolean (GIOCondition)>);

Take in an rvalue reference to std::function<>. It doesn't change much in this case, but it's a good habit.
Comment 3 Carlos Garcia Campos 2015-11-02 01:34:28 PST
Committed r191881: <http://trac.webkit.org/changeset/191881>