Skip to content

Commit

Permalink
Merge r231132 - [GTK] WebProcess from WebKitGtk+ 2.19.92 SIGSEVs in W…
Browse files Browse the repository at this point in the history
…ebCore::TextureMapperGL::~TextureMapperGL

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

Reviewed by Michael Catanzaro.

This can happen when using single shared process model or when the process limit is reached in multiple process
model. In this case, all pages in the same web process with accelerated compositing enabled share the same
compositing thread. Every page sets its GL context as current when rendering a frame, but not when invalidating
the threaded compositor when the page is closed. So, if a hidden tab is closed, the threaded compositor is
invalidated and the GL resources of the current context (the visible page) are destroyed. This is also causing
the blank pages issue when closing a tab related to another one, the current one stops rendering anything because
its GL context has been released. We should make the threaded compositor context current when invalidating it.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::invalidate):
  • Loading branch information
carlosgcampos committed May 7, 2018
1 parent 6dd0e21 commit 90fdf82
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,21 @@
2018-04-28 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] WebProcess from WebKitGtk+ 2.19.92 SIGSEVs in WebCore::TextureMapperGL::~TextureMapperGL
https://bugs.webkit.org/show_bug.cgi?id=184040

Reviewed by Michael Catanzaro.

This can happen when using single shared process model or when the process limit is reached in multiple process
model. In this case, all pages in the same web process with accelerated compositing enabled share the same
compositing thread. Every page sets its GL context as current when rendering a frame, but not when invalidating
the threaded compositor when the page is closed. So, if a hidden tab is closed, the threaded compositor is
invalidated and the GL resources of the current context (the visible page) are destroyed. This is also causing
the blank pages issue when closing a tab related to another one, the current one stops rendering anything because
its GL context has been released. We should make the threaded compositor context current when invalidating it.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::invalidate):

2018-04-24 Zan Dobersek <zdobersek@igalia.com>

REGRESSION(r230950): Faulty commit sequencing in CoordinatedGraphicsScene
Expand Down
Expand Up @@ -107,6 +107,8 @@ void ThreadedCompositor::invalidate()
m_displayRefreshMonitor->invalidate();
#endif
m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
if (!m_context || !m_context->makeContextCurrent())
return;
m_scene->purgeGLResources();
m_context = nullptr;
m_client.didDestroyGLContext();
Expand Down

0 comments on commit 90fdf82

Please sign in to comment.