[Webkit-unassigned] [Bug 159346] [GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux implementation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 1 06:07:42 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=159346
--- Comment #3 from Antonio Gomes <tonikitoo at webkit.org> ---
Comment on attachment 282540
--> https://bugs.webkit.org/attachment.cgi?id=282540
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=282540&action=review
Looking good. One overall suggestion to use Optional rather than -1/0.
> Source/WebCore/platform/MemoryPressureHandler.h:176
> + int m_eventFD { -1 };
> + int m_pressureLevelFD { -1 };
since we are touch these now, can we make it Optional<int> instead of using magic -1 or 0?
It would allow us to if-check
if (m_eventFD)
instead of
if (m_eventFD != -1)
Also we could reset with
m_eventFD = Nullopt;
And access its value with either *m_eventFD or m_eventFD.value().
WDYT?
--
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/20160701/2be56624/attachment.html>
More information about the webkit-unassigned
mailing list