RESOLVED FIXED 130409
Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
https://bugs.webkit.org/show_bug.cgi?id=130409
Summary Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
Sergio Villar Senin
Reported 2014-03-18 11:44:58 PDT
CSS: use static NeverDestroyed<T> instead of DEPRECATED_DEFINE_STATIC_LOCAL
Attachments
Patch (10.63 KB, patch)
2014-03-18 11:49 PDT, Sergio Villar Senin
no flags
Patch (11.81 KB, patch)
2014-03-20 02:08 PDT, Sergio Villar Senin
no flags
Patch (11.75 KB, patch)
2014-03-20 11:46 PDT, Sergio Villar Senin
no flags
Another try (11.76 KB, patch)
2014-03-21 03:09 PDT, Sergio Villar Senin
no flags
Patch (11.80 KB, patch)
2014-03-28 10:12 PDT, Sergio Villar Senin
darin: review+
Sergio Villar Senin
Comment 1 2014-03-18 11:49:10 PDT
Darin Adler
Comment 2 2014-03-19 18:29:32 PDT
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.
Sergio Villar Senin
Comment 3 2014-03-20 02:08:12 PDT
Created attachment 227275 [details] Patch Yeah stupid mistake, added it in 2 classes
Darin Adler
Comment 4 2014-03-20 09:05:20 PDT
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.
Sergio Villar Senin
Comment 5 2014-03-20 10:39:23 PDT
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?
Sergio Villar Senin
Comment 6 2014-03-20 11:46:17 PDT
Sergio Villar Senin
Comment 7 2014-03-21 03:09:16 PDT
Created attachment 227407 [details] Another try
Sergio Villar Senin
Comment 8 2014-03-21 08:35:08 PDT
Perhaps Brent has an idea about what's going on here...
Brent Fulgham
Comment 9 2014-03-28 09:41:28 PDT
I just tried it on my Windows machine. If you use “friend class WTF::NeverDestroyed<blah blah>;” it should compile properly.
Sergio Villar Senin
Comment 10 2014-03-28 10:12:48 PDT
Created attachment 228062 [details] Patch Windows fix. We need WTF:: in the friend class declaration
Sergio Villar Senin
Comment 11 2014-03-31 01:36:02 PDT
Note You need to log in before you can comment on or make changes to this bug.