[webkit-reviews] review granted: [Bug 129612] Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL : [Attachment 226588] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 13 09:58:36 PDT 2014


Darin Adler <darin at apple.com> has granted Sergio Villar Senin
<svillar at igalia.com>'s request for review:
Bug 129612: Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
https://bugs.webkit.org/show_bug.cgi?id=129612

Attachment 226588: Patch
https://bugs.webkit.org/attachment.cgi?id=226588&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=226588&action=review


Did you use the do-webcore-rename script? It’s really good at doing changes
like this one automatically.

> Source/WTF/wtf/StdLibExtras.h:38
> -#ifndef DEFINE_STATIC_LOCAL
> +#ifndef DEPRECATED_DEFINE_STATIC_LOCAL

Should update the comment above to talk about using NeverDestroyed instead.

> Tools/DumpRenderTree/JavaScriptThreading.cpp:49
> +    DEPRECATED_DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());

Note for the future: I’m surprised we need this at all in test tools. A plain
old static should be OK in all the test tool cases. It’s only the frameworks
themselves that have the “no static destructor” constraint.

> Tools/Scripts/check-for-exit-time-destructors:100
> +    print "ERROR: Use DEPRECATED_DEFINE_STATIC_LOCAL from
<wtf/StdLibExtras.h>\n";

This is no longer correct advice. The message should mention NeverDestroyed
instead.

> Tools/TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp:45
> +DEPRECATED_DEFINE_STATIC_LOCAL(String, rootDir, (ASCIILiteral("/")));

Same thought here about test tools not needing this.


More information about the webkit-reviews mailing list