Title: [211348] trunk/Source/WebKit2
Revision
211348
Author
carlo...@webkit.org
Date
2017-01-28 23:16:51 -0800 (Sat, 28 Jan 2017)

Log Message

[Threaded Compositor] Crash when detaching the CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=167547

Reviewed by Michael Catanzaro.

It seems that commitSceneState() can be called after the CoordinatedGraphicsScene has been detached.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::commitSceneState): Return early if scene has been detached.
(WebKit::CoordinatedGraphicsScene::detach): Take the render queue lock before clearing the render queue.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (211347 => 211348)


--- trunk/Source/WebKit2/ChangeLog	2017-01-29 07:15:33 UTC (rev 211347)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-29 07:16:51 UTC (rev 211348)
@@ -1,5 +1,18 @@
 2017-01-28  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        [Threaded Compositor] Crash when detaching the CoordinatedGraphicsScene
+        https://bugs.webkit.org/show_bug.cgi?id=167547
+
+        Reviewed by Michael Catanzaro.
+
+        It seems that commitSceneState() can be called after the CoordinatedGraphicsScene has been detached.
+
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+        (WebKit::CoordinatedGraphicsScene::commitSceneState): Return early if scene has been detached.
+        (WebKit::CoordinatedGraphicsScene::detach): Take the render queue lock before clearing the render queue.
+
+2017-01-28  Carlos Garcia Campos  <cgar...@igalia.com>
+
         [Threaded Compositor] Crash when deleting the compositor run loop
         https://bugs.webkit.org/show_bug.cgi?id=167545
 

Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (211347 => 211348)


--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-01-29 07:15:33 UTC (rev 211347)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-01-29 07:16:51 UTC (rev 211348)
@@ -598,6 +598,9 @@
 
 void CoordinatedGraphicsScene::commitSceneState(const CoordinatedGraphicsState& state)
 {
+    if (!m_client)
+        return;
+
     m_renderedContentsScrollPosition = state.scrollPosition;
 
     createLayers(state.layersToCreate);
@@ -707,9 +710,10 @@
 void CoordinatedGraphicsScene::detach()
 {
     ASSERT(isMainThread());
-    m_renderQueue.clear();
     m_isActive = false;
     m_client = nullptr;
+    LockHolder locker(m_renderQueueMutex);
+    m_renderQueue.clear();
 }
 
 void CoordinatedGraphicsScene::appendUpdate(std::function<void()>&& function)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to