Bug 172160

Summary: [GLib] Use RunLoopSourcePriority::RunLoopTimer as the GSocketMonitor's GSource priority
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Zan Dobersek 2017-05-15 22:45:57 PDT
[GLib] Use RunLoopSourcePriority::RunLoopTimer as the GSocketMonitor's GSource priority
Comment 1 Zan Dobersek 2017-05-15 22:46:56 PDT
Created attachment 310229 [details]
Patch
Comment 2 Carlos Garcia Campos 2017-05-16 00:58:23 PDT
Comment on attachment 310229 [details]
Patch

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

> Source/WebKit2/ChangeLog:11
> +        * Platform/IPC/glib/GSocketMonitor.cpp:
> +        (IPC::GSocketMonitor::start): Explicitly set the priority for the GSocketMonitor's
> +        GSource object to RunLoopSourcePriority::RunLoopTimer, equating the dispatch
> +        priority to that of RunLoop::Timer objects.

I'm not sure this is the priority we want. Messages sent to the io thread will be done by WorkQueue::dispatch which uses the RunLoopDispatcher priority. So, in the case of the GTK+ port this is giving more priority to socket events. We want at least the same priority, or even more to the dispatchs, so that for example a connectionDidClose() message could be dispatched even if the socket has data to read. So, I would use RunLoopDispatcher instead of RunLoopTimer to use the same priority in both GTK+ and WPE ports.
Comment 3 Zan Dobersek 2017-05-16 05:02:59 PDT
Created attachment 310254 [details]
Patch
Comment 4 Zan Dobersek 2017-05-16 05:57:18 PDT
Comment on attachment 310254 [details]
Patch

Clearing flags on attachment: 310254

Committed r216929: <http://trac.webkit.org/changeset/216929>
Comment 5 Zan Dobersek 2017-05-16 05:57:22 PDT
All reviewed patches have been landed.  Closing bug.