[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 02:23:55 PDT 2016


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

--- Comment #20 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #19)
> Comment on attachment 281244 [details]
> 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.

OK.

> > 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().

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.

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


More information about the webkit-unassigned mailing list