CSS: use static NeverDestroyed<T> instead of DEPRECATED_DEFINE_STATIC_LOCAL
Created attachment 227083 [details] Patch
Comment on attachment 227083 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227083&action=review > Source/WebCore/css/CSSValuePool.cpp:41 > CSSValuePool& cssValuePool() > { > - DEPRECATED_DEFINE_STATIC_LOCAL(CSSValuePool, pool, ()); > + static NeverDestroyed<CSSValuePool> pool; > return pool; > } You’ll need to change the friend directive for this function.
Created attachment 227275 [details] Patch Yeah stupid mistake, added it in 2 classes
Comment on attachment 227275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227275&action=review > Source/WebCore/css/CSSValuePool.h:44 > + friend class NeverDestroyed<CSSValuePool>; Seems like this did not work on Windows.
Comment on attachment 227275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227275&action=review >> Source/WebCore/css/CSSValuePool.h:44 >> + friend class NeverDestroyed<CSSValuePool>; > > Seems like this did not work on Windows. Weird because it worked fine for the other platforms, maybe defining it after the WTF_MAKE_FAST_ALLOCATED?
Created attachment 227309 [details] Patch
Created attachment 227407 [details] Another try
Perhaps Brent has an idea about what's going on here...
I just tried it on my Windows machine. If you use “friend class WTF::NeverDestroyed<blah blah>;” it should compile properly.
Created attachment 228062 [details] Patch Windows fix. We need WTF:: in the friend class declaration
Committed r166486: <http://trac.webkit.org/changeset/166486>