Title: [207079] releases/WebKitGTK/webkit-2.14/Source/WebCore
Revision
207079
Author
carlo...@webkit.org
Date
2016-10-11 03:36:43 -0700 (Tue, 11 Oct 2016)

Log Message

Merge r206061 - ASSERTION FAILED: The string being removed is atomic in the string table of an other thread! iterator != atomicStringTable.end() at Source/WTF/wtf/text/AtomicStringImpl.cpp(453)
https://bugs.webkit.org/show_bug.cgi?id=161800

Reviewed by Žan Doberšek.

Speculative fix. These strings are created as static objects on a secondary thread, but all
static objects are destroyed in exit handlers on the main thread, and AtomicStrings must
always be destroyed on the same thread they are created.

* platform/graphics/texmap/TextureMapperShaderProgram.h:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207078 => 207079)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-10-11 10:31:36 UTC (rev 207078)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-10-11 10:36:43 UTC (rev 207079)
@@ -1,3 +1,16 @@
+2016-09-16  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        ASSERTION FAILED: The string being removed is atomic in the string table of an other thread! iterator != atomicStringTable.end() at Source/WTF/wtf/text/AtomicStringImpl.cpp(453)
+        https://bugs.webkit.org/show_bug.cgi?id=161800
+
+        Reviewed by Žan Doberšek.
+
+        Speculative fix. These strings are created as static objects on a secondary thread, but all
+        static objects are destroyed in exit handlers on the main thread, and AtomicStrings must
+        always be destroyed on the same thread they are created.
+
+        * platform/graphics/texmap/TextureMapperShaderProgram.h:
+
 2016-09-15  Zalan Bujtas  <za...@apple.com>
 
         ASSERTION FAILED: willBeComposited == needsToBeComposited(layer) in WebCore::RenderLayerCompositor::computeCompositingRequirements

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h (207078 => 207079)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h	2016-10-11 10:31:36 UTC (rev 207078)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h	2016-10-11 10:36:43 UTC (rev 207079)
@@ -26,12 +26,18 @@
 #include "GraphicsContext3D.h"
 #include "TransformationMatrix.h"
 #include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
 #include <wtf/Ref.h>
 #include <wtf/text/AtomicStringHash.h>
 
 namespace WebCore {
 
-#define TEXMAP_DECLARE_VARIABLE(Accessor, Name, Type) GC3Duint Accessor##Location() { static const AtomicString name(Name); return getLocation(name, Type); }
+#define TEXMAP_DECLARE_VARIABLE(Accessor, Name, Type) \
+    GC3Duint Accessor##Location() { \
+        static NeverDestroyed<const AtomicString> name(Name, AtomicString::ConstructFromLiteral); \
+        return getLocation(name.get(), Type); \
+    }
+
 #define TEXMAP_DECLARE_UNIFORM(Accessor) TEXMAP_DECLARE_VARIABLE(Accessor, "u_"#Accessor, UniformVariable)
 #define TEXMAP_DECLARE_ATTRIBUTE(Accessor) TEXMAP_DECLARE_VARIABLE(Accessor, "a_"#Accessor, AttribVariable)
 #define TEXMAP_DECLARE_SAMPLER(Accessor) TEXMAP_DECLARE_VARIABLE(Accessor, "s_"#Accessor, UniformVariable)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to