<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444#c20">Comment # 20</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444">bug 154444</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154444#c19">comment #19</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=281244&amp;action=diff" name="attach_281244" title="Updated patch">attachment 281244</a> <a href="attachment.cgi?id=281244&amp;action=edit" title="Updated patch">[details]</a></span>
&gt; Updated patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=281244&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=281244&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:69
&gt; &gt; +        ASSERT((handle &amp;&amp; !m_nativeSurfaceHandle) || (m_nativeSurfaceHandle &amp;&amp; !handle));
&gt; 
&gt; That's a good assert. Could be simplified into an exclusive-or.</span >

OK.

<span class="quote">&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:76
&gt; &gt; +        // In case m_nativeSurfaceHandle is 0 now, tryEnsureGLContext will destroy the current context and will
&gt; &gt; +        // fail to ensure a new one, so that any previous operation pending and new ones will be discarded.
&gt; &gt; +        // In case m_nativeSurfaceHandle is a valid handle, tryEnsureGLContext will create a new context for the
&gt; &gt; +        // new handle.
&gt; &gt; +        tryEnsureGLContext();
&gt; 
&gt; You're not 'ensuring' anything if the handle is null, and you are creating
&gt; the context prematurely (and blocking the main thread) if the handle is not
&gt; null.
&gt; 
&gt; I propose just nulling out m_context here if the handle is null, avoiding
&gt; any changes to ThreadedCompositor::ensureGLContext().</span >

hmm, yes, much simpler, thanks! I'll keep the rename though, since ensureGLContext still doesn't ensure that a context is created and can fail.</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>