[CoordinatedGraphics] Segmentation fault at CoordinatedGraphicsScene::clearImageBack...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jan 2014 11:14:04 +0000 (11:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Jan 2014 11:14:04 +0000 (11:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125776

Patch by Edit Balint <edbalint@inf.u-szeged.hu> on 2014-01-20
Reviewed by Csaba Osztrogon√°c.

Unexpected behavior occurs in some test cases which leads to segmentation fault.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::removeImageBacking):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp

index 5fde81e..5e2c2e0 100644 (file)
@@ -1,3 +1,16 @@
+2014-01-20  Edit Balint  <edbalint@inf.u-szeged.hu>
+
+        [CoordinatedGraphics] Segmentation fault at  CoordinatedGraphicsScene::clearImageBackingContents
+
+        https://bugs.webkit.org/show_bug.cgi?id=125776
+
+        Reviewed by Csaba Osztrogon√°c.
+
+        Unexpected behavior occurs in some test cases which leads to segmentation fault.
+
+        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
+        (WebCore::CompositingCoordinator::removeImageBacking):
+
 2014-01-20  Morten Stenshorne  <mstensho@opera.com>
 
         Region based multicol: tall line causes taller multicol container than necessary
index 14bc956..18ec5ea 100644 (file)
@@ -235,6 +235,10 @@ void CompositingCoordinator::removeImageBacking(CoordinatedImageBackingID imageI
     m_imageBackings.remove(imageID);
 
     m_state.imagesToRemove.append(imageID);
+
+    size_t imageIDPosition = m_state.imagesToClear.find(imageID);
+    if (imageIDPosition != notFound)
+        m_state.imagesToClear.remove(imageIDPosition);
 }
 
 void CompositingCoordinator::flushPendingImageBackingChanges()