Bug 130409 - Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
Summary: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords:
Depends on:
Blocks: 130185
  Show dependency treegraph
 
Reported: 2014-03-18 11:44 PDT by Sergio Villar Senin
Modified: 2015-10-30 03:28 PDT (History)
13 users (show)

See Also:


Attachments
Patch (10.63 KB, patch)
2014-03-18 11:49 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (11.81 KB, patch)
2014-03-20 02:08 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (11.75 KB, patch)
2014-03-20 11:46 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Another try (11.76 KB, patch)
2014-03-21 03:09 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (11.80 KB, patch)
2014-03-28 10:12 PDT, Sergio Villar Senin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2014-03-18 11:44:58 PDT
CSS: use static NeverDestroyed<T> instead of DEPRECATED_DEFINE_STATIC_LOCAL
Comment 1 Sergio Villar Senin 2014-03-18 11:49:10 PDT
Created attachment 227083 [details]
Patch
Comment 2 Darin Adler 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.
Comment 3 Sergio Villar Senin 2014-03-20 02:08:12 PDT
Created attachment 227275 [details]
Patch

Yeah stupid mistake, added it in 2 classes
Comment 4 Darin Adler 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.
Comment 5 Sergio Villar Senin 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?
Comment 6 Sergio Villar Senin 2014-03-20 11:46:17 PDT
Created attachment 227309 [details]
Patch
Comment 7 Sergio Villar Senin 2014-03-21 03:09:16 PDT
Created attachment 227407 [details]
Another try
Comment 8 Sergio Villar Senin 2014-03-21 08:35:08 PDT
Perhaps Brent has an idea about what's going on here...
Comment 9 Brent Fulgham 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.
Comment 10 Sergio Villar Senin 2014-03-28 10:12:48 PDT
Created attachment 228062 [details]
Patch

Windows fix. We need WTF:: in the friend class declaration
Comment 11 Sergio Villar Senin 2014-03-31 01:36:02 PDT
Committed r166486: <http://trac.webkit.org/changeset/166486>