<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=159346#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GLib] Use a GSource instead of a thread to poll memory pressure eventFD in linux implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=159346">bug 159346</a>
              from <span class="vcard"><a class="email" href="mailto:tonikitoo&#64;webkit.org" title="Antonio Gomes &lt;tonikitoo&#64;webkit.org&gt;"> <span class="fn">Antonio Gomes</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=282540&amp;action=diff" name="attach_282540" title="Patch">attachment 282540</a> <a href="attachment.cgi?id=282540&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=282540&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=282540&amp;action=review</a>

Looking good. One overall suggestion to use Optional rather than -1/0.

<span class="quote">&gt; Source/WebCore/platform/MemoryPressureHandler.h:176
&gt; +    int m_eventFD { -1 };
&gt; +    int m_pressureLevelFD { -1 };</span >

since we are touch these now, can we make it Optional&lt;int&gt; 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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>