Title: [211792] releases/WebKitGTK/webkit-2.14/Source/WebKit2
Revision
211792
Author
carlo...@webkit.org
Date
2017-02-07 01:33:29 -0800 (Tue, 07 Feb 2017)

Log Message

Merge r211348 - [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: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (211791 => 211792)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2017-02-07 09:33:24 UTC (rev 211791)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2017-02-07 09:33:29 UTC (rev 211792)
@@ -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: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (211791 => 211792)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-02-07 09:33:24 UTC (rev 211791)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-02-07 09:33:29 UTC (rev 211792)
@@ -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