Summary: | REGRESSION(r177075): WebProcess crashes when entering accelerating compositing mode before the WebView is realized | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | gustavo, j.isorce, mrobinson, zan | ||||||
Priority: | P2 | Keywords: | Gtk, Regression | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Carlos Garcia Campos
2015-02-27 01:07:32 PST
This can be reproduced with epiphany. 1- Disable the delayed load option of ephy 2- search for poster circle in google 3- Middle click on tyhe result to open it in a new tab (let the tab load) 4- Move to the new tab CRASH! The problem is that the texture mapper and native window handler are initialized when the LayerTreeHost is initialized, assuming the UI process has already sent the native window handler to the web process, but that doesn't always happen since we moved the redirected window creation to realize. Created attachment 247504 [details]
Patch
Comment on attachment 247504 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247504&action=review > Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:86 > + m_context = GLContext::createContextForWindow(m_layerTreeContext.contextID, GLContext::sharingContext()); GLContext::createContextForWindow() can still return null. But you don't want to call that every time you call LayerTreeHostGtk::makeContextCurrent(). > Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:90 > + m_context->makeContextCurrent(); > + return true; Here you should return the return value of GLContext::makeContextCurrent(). Comment on attachment 247504 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247504&action=review Thanks for the review, I'll submit a new patch. >> Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:86 >> + m_context = GLContext::createContextForWindow(m_layerTreeContext.contextID, GLContext::sharingContext()); > > GLContext::createContextForWindow() can still return null. But you don't want to call that every time you call LayerTreeHostGtk::makeContextCurrent(). I'm not sure I get what you mean, I need to check if m_context is nullptr or not, that's right. But why not calling this everytime LayerTreeHostGtk::makeContextCurrent() is called? It's only called when the context is nullptr. I noticed that glContext() was always used to make the context current, that's why I tried to simplify the caller with this method, that it should do the same than previous code (it doesn't because I made some mistakes, though) >> Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:90 >> + return true; > > Here you should return the return value of GLContext::makeContextCurrent(). Right. > Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:-123 > - context->makeContextCurrent(); So, here for example we are not checking the return value of makeContextCurrent(), I guess we should, there's a comment saying that the creation fo the texture mapper needs an active context, and we are creating the texture mapper after this. Created attachment 247655 [details]
Updated patch
Comment on attachment 247655 [details]
Updated patch
Looks OK.
Committed r180924: <http://trac.webkit.org/changeset/180924> |