[Webkit-unassigned] [Bug 154444] [ThreadedCompositor] Opening the inspector in a window causes a crash.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 14 01:47:04 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=154444

--- Comment #19 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 281244
  --> https://bugs.webkit.org/attachment.cgi?id=281244
Updated patch

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

> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:69
> +        ASSERT((handle && !m_nativeSurfaceHandle) || (m_nativeSurfaceHandle && !handle));

That's a good assert. Could be simplified into an exclusive-or.

> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:76
> +        // In case m_nativeSurfaceHandle is 0 now, tryEnsureGLContext will destroy the current context and will
> +        // fail to ensure a new one, so that any previous operation pending and new ones will be discarded.
> +        // In case m_nativeSurfaceHandle is a valid handle, tryEnsureGLContext will create a new context for the
> +        // new handle.
> +        tryEnsureGLContext();

You're not 'ensuring' anything if the handle is null, and you are creating the context prematurely (and blocking the main thread) if the handle is not null.

I propose just nulling out m_context here if the handle is null, avoiding any changes to ThreadedCompositor::ensureGLContext().

-- 
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/20160614/fc087f85/attachment.html>


More information about the webkit-unassigned mailing list