• andersca@apple.com's avatar
    Add WTF::NeverDestroyed and start using it in WTF · 7867ba07
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=116472
    
    Reviewed by Benjamin Poulain.
    
    NeverDestroyed is a class template that can be used for singletons and other objects that we never
    want to destroy. It's intended as a replacement for WTF_STATIC_LOCAL with the advantage that it doesn't
    fragment the heap.
    
    * GNUmakefile.list.am:
    * WTF.vcproj/WTF.vcproj:
    * WTF.vcxproj/WTF.vcxproj:
    * WTF.vcxproj/WTF.vcxproj.filters:
    * WTF.xcodeproj/project.pbxproj:
    Add NeverDestroyed.h
    
    * wtf/Compiler.h:
    Add a helper macro, WTF_DELETED_FUNCTION.
    
    * wtf/CryptographicallyRandomNumber.cpp:
    Use NeverDestroyed.
    
    * wtf/NeverDestroyed.h: Added.
    
    * wtf/Noncopyable.h:
    Use WTF_DELETED_FUNCTION.
    
    * wtf/text/WTFString.cpp:
    (WTF::emptyString):
    Use
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7867ba07
WTF.vcxproj.filters 22.4 KB