Bug 129802 - [GTK] Don't busy loop when the socket is full
Summary: [GTK] Don't busy loop when the socket is full
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-06 07:46 PST by Giovanni Campagna
Modified: 2014-03-17 11:21 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.20 KB, patch)
2014-03-06 07:47 PST, Giovanni Campagna
no flags Details | Formatted Diff | Diff
Patch (2.09 KB, patch)
2014-03-17 02:28 PDT, Giovanni Campagna
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Campagna 2014-03-06 07:46:49 PST
[GTK] Don't busy loop when the socket is full
Comment 1 Giovanni Campagna 2014-03-06 07:47:55 PST
Created attachment 225992 [details]
Patch
Comment 2 Philippe Normand 2014-03-16 03:41:39 PDT
Interesting patch!

Would you mind providing a ChangeLog? Tools/Scripts/prepare-ChangeLog can generate a template to fill out.
Comment 3 Carlos Garcia Campos 2014-03-17 01:40:36 PDT
Comment on attachment 225992 [details]
Patch

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

Thanks for the patch. This patch needs a ChangeLog, see http://www.webkit.org/coding/contributing.html.

> Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:37
> +#include <poll.h>

Is this available in all UNIX platforms?

> Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:535
> +            poll(&pollfd, 1, -1);
> +        }

Does this really work? Don't you need to continue the loop when poll returns?
Comment 4 Giovanni Campagna 2014-03-17 02:23:06 PDT
(In reply to comment #3)
> (From update of attachment 225992 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225992&action=review
> 
> Thanks for the patch. This patch needs a ChangeLog, see http://www.webkit.org/coding/contributing.html.
> 
> > Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp:37
> > +#include <poll.h>
> 
> Is this available in all UNIX platforms?

Yes, it is part of the Single Unix Specification, see http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm
Comment 5 Giovanni Campagna 2014-03-17 02:28:24 PDT
Created attachment 226897 [details]
Patch
Comment 6 Carlos Garcia Campos 2014-03-17 10:48:19 PDT
Comment on attachment 226897 [details]
Patch

Ok looks good. Thanks!
Comment 7 WebKit Commit Bot 2014-03-17 11:20:57 PDT
Comment on attachment 226897 [details]
Patch

Clearing flags on attachment: 226897

Committed r165745: <http://trac.webkit.org/changeset/165745>
Comment 8 WebKit Commit Bot 2014-03-17 11:21:00 PDT
All reviewed patches have been landed.  Closing bug.