[Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 00:43:22 +0000 (00:43 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 00:43:22 +0000 (00:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196190

Reviewed by Žan Doberšek.

This assertion assumes the pre-committed and the committed scenes
are identical. But, the pre-committed scene is updated in the main
thread. Removed the false assertion.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::purgeGLResources): Remove the
assertion. Removed layers of committed scene, not pre-committed
scene.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243475 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp

index ab38567..87a4928 100644 (file)
@@ -1,3 +1,19 @@
+2019-03-25  Fujii Hironori  <Hironori.Fujii@sony.com>
+
+        [Coordinated Graphics][WinCairo] ASSERTION FAILED: state.id == m_nicosia.state.id
+        https://bugs.webkit.org/show_bug.cgi?id=196190
+
+        Reviewed by Žan Doberšek.
+
+        This assertion assumes the pre-committed and the committed scenes
+        are identical. But, the pre-committed scene is updated in the main
+        thread. Removed the false assertion.
+
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+        (WebKit::CoordinatedGraphicsScene::purgeGLResources): Remove the
+        assertion. Removed layers of committed scene, not pre-committed
+        scene.
+
 2019-03-25  Brady Eidson  <beidson@apple.com>
 
         Add socket-delegate to another entitlements config
index 55d81d3..eb6af98 100644 (file)
@@ -431,13 +431,12 @@ void CoordinatedGraphicsScene::purgeGLResources()
 
     if (m_nicosia.scene) {
         m_nicosia.scene->accessState(
-            [this](const Nicosia::Scene::State& state)
+            [](Nicosia::Scene::State& state)
             {
-                ASSERT(state.id == m_nicosia.state.id);
-                for (auto& layer : m_nicosia.state.layers)
+                for (auto& layer : state.layers)
                     removeLayer(*layer);
-                m_nicosia.state.layers = { };
-                m_nicosia.state.rootLayer = nullptr;
+                state.layers = { };
+                state.rootLayer = nullptr;
             });
         m_nicosia.scene = nullptr;
     }