Changeset 224277 in webkit


Ignore:
Timestamp:
Nov 1, 2017 6:31:36 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Use LazyNeverDestroyed instead of DEFINE_GLOBAL
https://bugs.webkit.org/show_bug.cgi?id=174979

Patch by Fujii Hironori <Fujii Hironori> on 2017-11-01
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.

Source/WebCore:

No new tests since there should be no behavioral change.

  • DerivedSources.cpp: Remove the warning of StaticConstructors.h.
  • WebCore.order: Removed
  • config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.
  • dom/QualifiedName.cpp:

(WebCore::createQualifiedName): Deleted.

  • dom/QualifiedName.h: Removed createQualifiedName.
  • dom/make_names.pl:

(printCppHead): Do not include StaticConstructors.h.

Source/WTF:

DEFINE_GLOBAL is not used anymore. Remove it.

  • WTF.xcodeproj/project.pbxproj: Removed StaticConstructors.h
  • config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.
  • wtf/CMakeLists.txt: Removed StaticConstructors.h
  • wtf/StaticConstructors.h: Removed.
Location:
trunk/Source
Files:
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r224276 r224277  
     12017-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Use LazyNeverDestroyed instead of DEFINE_GLOBAL
     4        https://bugs.webkit.org/show_bug.cgi?id=174979
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        * config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.
     9
    1102017-10-27  Yusuke Suzuki  <utatane.tea@gmail.com>
    211
  • trunk/Source/JavaScriptCore/config.h

    r218167 r224277  
    3333
    3434#include <wtf/DisallowCType.h>
    35 
    36 #if COMPILER(MSVC)
    37 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
    38 #else
    39 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
    40 #endif
  • trunk/Source/WTF/ChangeLog

    r224192 r224277  
     12017-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Use LazyNeverDestroyed instead of DEFINE_GLOBAL
     4        https://bugs.webkit.org/show_bug.cgi?id=174979
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        DEFINE_GLOBAL is not used anymore. Remove it.
     9
     10        * WTF.xcodeproj/project.pbxproj: Removed StaticConstructors.h
     11        * config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.
     12        * wtf/CMakeLists.txt: Removed StaticConstructors.h
     13        * wtf/StaticConstructors.h: Removed.
     14
    1152017-10-30  Michael Catanzaro  <mcatanzaro@igalia.com>
    216
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r224136 r224277  
    503503                A8A4730E151A825B004123FF /* StackBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackBounds.cpp; sourceTree = "<group>"; };
    504504                A8A4730F151A825B004123FF /* StackBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackBounds.h; sourceTree = "<group>"; };
    505                 A8A47310151A825B004123FF /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; };
    506505                A8A47311151A825B004123FF /* StdLibExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdLibExtras.h; sourceTree = "<group>"; };
    507506                A8A47313151A825B004123FF /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = "<group>"; };
     
    990989                                313EDEC9778E49C9BEA91CFC /* StackTrace.cpp */,
    991990                                EF7D6CD59D8642A8A0DA86AD /* StackTrace.h */,
    992                                 A8A47310151A825B004123FF /* StaticConstructors.h */,
    993991                                A8A47311151A825B004123FF /* StdLibExtras.h */,
    994992                                C4F8A93619C65EB400B2B15D /* Stopwatch.h */,
  • trunk/Source/WTF/config.h

    r218166 r224277  
    3333
    3434#include <wtf/DisallowCType.h>
    35 
    36 #if COMPILER(MSVC)
    37 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
    38 #else
    39 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
    40 #endif
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r222771 r224277  
    133133    StackStats.h
    134134    StackTrace.h
    135     StaticConstructors.h
    136135    StdLibExtras.h
    137136    Stopwatch.h
  • trunk/Source/WebCore/ChangeLog

    r224275 r224277  
     12017-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        Use LazyNeverDestroyed instead of DEFINE_GLOBAL
     4        https://bugs.webkit.org/show_bug.cgi?id=174979
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        No new tests since there should be no behavioral change.
     9
     10        * DerivedSources.cpp: Remove the warning of StaticConstructors.h.
     11        * WebCore.order: Removed
     12        * config.h: Removed definitions of SKIP_STATIC_CONSTRUCTORS_ON_MSVC and SKIP_STATIC_CONSTRUCTORS_ON_GCC.
     13        * dom/QualifiedName.cpp:
     14        (WebCore::createQualifiedName): Deleted.
     15        * dom/QualifiedName.h: Removed createQualifiedName.
     16        * dom/make_names.pl:
     17        (printCppHead): Do not include StaticConstructors.h.
     18
    1192017-11-01  Michael Catanzaro  <mcatanzaro@igalia.com>
    220
  • trunk/Source/WebCore/DerivedSources.cpp

    r222291 r224277  
    649649#include "JSXPathResult.cpp"
    650650#include "JSXSLTProcessor.cpp"
    651 
    652 // On MSVC, including StaticConstructors.h causes all global objects not to be
    653 // automatically initialized by the C runtime. This is useful in some specific
    654 // cases (e.g., the *Names.cpp files), but can be dangerous in others. We don't
    655 // want StaticConstructors.h to "pollute" all the source files we #include here
    656 // accidentally, so we'll throw an error whenever any file includes it.
    657 #ifdef StaticConstructors_h
    658 #error Do not include any file in DerivedSources.cpp that includes StaticConstructors.h
    659 #endif
  • trunk/Source/WebCore/WebCore.order

    r217371 r224277  
    886886__ZNK7WebCore9FrameTree6parentEv
    887887__ZN7WebCore9HTMLNames4initEv
    888 __ZN7WebCore19createQualifiedNameEPvPN3WTF10StringImplERKNS1_12AtomicStringE
    889888__ZN3WTF9HashTableIPN7WebCore13QualifiedName17QualifiedNameImplES4_NS_17IdentityExtractorENS1_17QualifiedNameHashENS1_23QualifiedNameHashTraitsES7_E16lookupForWritingINS_22IdentityHashTranslatorIS6_EES4_EENSt3__14pairIPS4_bEERKT0_
    890889__ZN3WTF9HashTableIPN7WebCore13QualifiedName17QualifiedNameImplES4_NS_17IdentityExtractorENS1_17QualifiedNameHashENS1_23QualifiedNameHashTraitsES7_E18addPassingHashCodeINS_24HashSetTranslatorAdapterINS1_25QNameComponentsTranslatorEEENS1_23QualifiedNameComponentsESD_EENS_18HashTableAddResultINS_17HashTableIteratorIS4_S4_S5_S6_S7_S7_EEEERKT0_RKT1_
     
    894893__ZN3WTF12StringHasher10hashMemoryILm24EEEjPKv
    895894__ZN7WebCore25QNameComponentsTranslator9translateERPNS_13QualifiedName17QualifiedNameImplERKNS_23QualifiedNameComponentsEj
    896 __ZN7WebCore19createQualifiedNameEPvPN3WTF10StringImplE
    897895__ZN7WebCore13QualifiedName4initEv
    898896__ZN7WebCore17MediaFeatureNames4initEv
  • trunk/Source/WebCore/config.h

    r222148 r224277  
    7272#include <wtf/DisallowCType.h>
    7373
    74 #if COMPILER(MSVC)
    75 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
    76 #else
    77 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
    78 #endif
    79 
    8074#if PLATFORM(WIN)
    8175#if PLATFORM(WIN_CAIRO)
  • trunk/Source/WebCore/dom/QualifiedName.cpp

    r223314 r224277  
    7070}
    7171
    72 void createQualifiedName(void* targetAddress, const StaticStringImpl* name, const AtomicString& nameNamespace)
    73 {
    74     new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom(), AtomicString(name), nameNamespace);
    7572}
    76 
    77 void createQualifiedName(void* targetAddress, const StaticStringImpl* name)
    78 {
    79     new (NotNull, reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom(), AtomicString(name), nullAtom());
    80 }
    81 
    82 }
  • trunk/Source/WebCore/dom/QualifiedName.h

    r223314 r224277  
    137137};
    138138
    139 void createQualifiedName(void* targetAddress, const StaticStringImpl* name);
    140 void createQualifiedName(void* targetAddress, const StaticStringImpl* name, const AtomicString& nameNamespace);
    141 
    142139inline String QualifiedName::toString() const
    143140{
  • trunk/Source/WebCore/dom/make_names.pl

    r224213 r224277  
    137137
    138138    for my $name (sort keys %parameters) {
    139         # FIXME: Would like to use static_cast here, but there are differences in const
    140         # depending on whether SKIP_STATIC_CONSTRUCTORS_ON_GCC is used, so stick with a
    141         # C-style cast for now.
    142139        print F "    ${name}.construct(&${name}Data);\n";
    143140    }
     
    573570
    574571    print F "#include \"${namespace}Names.h\"\n\n";
    575     print F "#include <wtf/StaticConstructors.h>\n";
    576572
    577573    print F "namespace WebCore {\n\n";
Note: See TracChangeset for help on using the changeset viewer.