Changeset 206061 in webkit


Ignore:
Timestamp:
Sep 16, 2016 7:53:09 PM (8 years ago)
Author:
Michael Catanzaro
Message:

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:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206060 r206061  
     12016-09-16  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        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)
     4        https://bugs.webkit.org/show_bug.cgi?id=161800
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Speculative fix. These strings are created as static objects on a secondary thread, but all
     9        static objects are destroyed in exit handlers on the main thread, and AtomicStrings must
     10        always be destroyed on the same thread they are created.
     11
     12        * platform/graphics/texmap/TextureMapperShaderProgram.h:
     13
    1142016-09-16  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h

    r200451 r206061  
    2727#include "TransformationMatrix.h"
    2828#include <wtf/HashMap.h>
     29#include <wtf/NeverDestroyed.h>
    2930#include <wtf/Ref.h>
    3031#include <wtf/text/AtomicStringHash.h>
     
    3233namespace WebCore {
    3334
    34 #define TEXMAP_DECLARE_VARIABLE(Accessor, Name, Type) GC3Duint Accessor##Location() { static const AtomicString name(Name); return getLocation(name, Type); }
     35#define TEXMAP_DECLARE_VARIABLE(Accessor, Name, Type) \
     36    GC3Duint Accessor##Location() { \
     37        static NeverDestroyed<const AtomicString> name(Name, AtomicString::ConstructFromLiteral); \
     38        return getLocation(name.get(), Type); \
     39    }
     40
    3541#define TEXMAP_DECLARE_UNIFORM(Accessor) TEXMAP_DECLARE_VARIABLE(Accessor, "u_"#Accessor, UniformVariable)
    3642#define TEXMAP_DECLARE_ATTRIBUTE(Accessor) TEXMAP_DECLARE_VARIABLE(Accessor, "a_"#Accessor, AttribVariable)
Note: See TracChangeset for help on using the changeset viewer.