[Webkit-unassigned] [Bug 150770] [GTK] Use RunLoop in WorkQueue implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 2 00:13:23 PST 2015


--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #3)
> Comment on attachment 264509 [details]
> Patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=264509&action=review
> > Source/WTF/wtf/WorkQueue.h:43
> > +#include <wtf/RunLoop.h>
> Do we actually need this header to be included? Can we just forward-declare
> RunLoop? This header doesn’t actually depend on the content of RunLoop, just
> that it’s a pointer to some class.

Not only the pointer, we also have:

RunLoop& runLoop() const { return *m_runLoop; }

> > Source/WTF/wtf/WorkQueue.h:113
> > +    RunLoop* m_runLoop;
> Would be nice if we could find a way to make this a reference rather than a
> pointer.

If we make it a reference we would need to initialize it on construction, but the RunLoop has to be created by the worker thread. We could use Optional, but I'm not sure it would make the code better in this particular case.

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/20151102/feaf28bc/attachment.html>

More information about the webkit-unassigned mailing list