Splitting DEFINE_STATIC_LOCAL into two for better readability of the code. In this, one is without
any arguments whereas the other macro takes argument as macro param. This CL makes these calls
The macros DEFINE_STATIC_LOCAL and DEFINE_STATIC_LOCAL_WITH_ARG are defined in Source/wtf/StdLibExtras.h
The following commands are executed in order to change this:
git ls-files | xargs sed -i 's/DEFINE_STATIC_LOCAL\((.*\)\(, ()\)/DEFINE_STATIC_LOCAL_WITHOUT_ARG\1/g'
git ls-files | xargs sed -i 's/DEFINE_STATIC_LOCAL(/DEFINE_STATIC_LOCAL_WITH_ARG(/g'
git ls-files | xargs sed -i 's/DEFINE_STATIC_LOCAL_WITHOUT_ARG(/DEFINE_STATIC_LOCAL(/g'
Created attachment 234686 [details]
Attachment 234686 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/StdLibExtras.h:57: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] 
Total errors found: 1 in 295 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Instead of doing this, we should probably be moving code over to WTF::NeverDestroyed.
(In reply to comment #3)
> Instead of doing this, we should probably be moving code over to WTF::NeverDestroyed.
Yeah sure, would give it a try. Thanks for reviewing :)
Created attachment 234692 [details]
Created attachment 234693 [details]
Created attachment 234694 [details]
Created attachment 234695 [details]
Comment on attachment 234695 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=234695&action=review
Great idea, but this giant patch doesn’t build. How about a sequence of smaller patches to achieve the same thing? I’d like to carefully review each one to spot mistakes.
For String and AtomicString, it might be better to get rid of some of these rather than converting to NeverDestroyed; I think we’re overdoing the global AtomicString pattern.
A good idea for as first patch is something that only deals with clearly-correct cases such as maps and mutexes, and sticks to a manageable smaller list. Then we can tackle the trickier cases like strings. Also need a patch that successfully applies and compiles.
> + static NeverDestroyed<JSTestActiveDOMObjectOwner> jsTestActiveDOMObjectOwner;
These are generated files, so they should not be changed manually. Instead we need to change the script and regenerate.
*** This bug has been marked as a duplicate of bug 130185 ***