Title: [200456] trunk/Source/WebCore
Revision
200456
Author
[email protected]
Date
2016-05-05 08:31:16 -0700 (Thu, 05 May 2016)

Log Message

Fix assertions in debug builds for the GTK+ port.

Rubber-stamped by Carlos Garcia Campos.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
Switch back to the find() + add() combo for retrieving the pointer
to the SharedGLData object stored for the specific GraphicsContext3D.
add() + isNewEntry is causing assertions in debug builds when adding
the first entry.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200455 => 200456)


--- trunk/Source/WebCore/ChangeLog	2016-05-05 13:03:46 UTC (rev 200455)
+++ trunk/Source/WebCore/ChangeLog	2016-05-05 15:31:16 UTC (rev 200456)
@@ -1,3 +1,16 @@
+2016-05-05  Zan Dobersek  <[email protected]>
+
+        Fix assertions in debug builds for the GTK+ port.
+
+        Rubber-stamped by Carlos Garcia Campos.
+
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
+        Switch back to the find() + add() combo for retrieving the pointer
+        to the SharedGLData object stored for the specific GraphicsContext3D.
+        add() + isNewEntry is causing assertions in debug builds when adding
+        the first entry.
+
 2016-05-05  Carlos Garcia Campos  <[email protected]>
 
         [GStreamer] Adaptive streaming issues

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (200455 => 200456)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2016-05-05 13:03:46 UTC (rev 200455)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2016-05-05 15:31:16 UTC (rev 200456)
@@ -76,15 +76,13 @@
     public:
         static Ref<SharedGLData> currentSharedGLData(GraphicsContext3D& context)
         {
-            RefPtr<SharedGLData> data;
-            auto addResult = contextDataMap().add(context.platformGraphicsContext3D(), nullptr);
-            if (addResult.isNewEntry) {
-                data = "" SharedGLData(context));
-                addResult.iterator->value = data.get();
-            } else
-                data = ""
+            auto it = contextDataMap().find(context.platformGraphicsContext3D());
+            if (it != contextDataMap().end())
+                return *it->value;
 
-            return *data;
+            Ref<SharedGLData> data = "" SharedGLData(context));
+            contextDataMap().add(context.platformGraphicsContext3D(), data.ptr());
+            return data;
         }
 
         ~SharedGLData()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to