Summary: | Migrate the usage of DEPRECATED_DEFINE_STATIC_LOCAL(T, name, args) to "static NeverDestroyed<T> name(args)" | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vivek Galatage <vivekg> | ||||||||||||
Component: | Web Template Framework | Assignee: | Vivek Galatage <vivekg> | ||||||||||||
Status: | RESOLVED DUPLICATE | ||||||||||||||
Severity: | Normal | CC: | commit-queue, darin, sam | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Vivek Galatage
2014-07-09 20:49:14 PDT
Created attachment 234686 [details]
Patch
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] [5]
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]
Patch
Created attachment 234693 [details]
Patch
Created attachment 234694 [details]
Patch
Created attachment 234695 [details]
Patch
Comment on attachment 234695 [details] Patch 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. > Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h:86 > + 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 *** |