Re: [webkit-dev] Naming singletons

2024-09-13 Thread Chris Dumez via webkit-dev
Happens to match our coding style already: https://webkit.org/code-style-guidelines/#singleton-static-member > On Sep 13, 2024, at 2:41 PM, Ryosuke Niwa via webkit-dev > wrote: > > Hi all, > > TL; DR: Add “Singleton” suffix to a function which returns a singleton to > help aid WebKit static

[webkit-dev] Naming singletons

2024-09-13 Thread Ryosuke Niwa via webkit-dev
Hi all, TL; DR: Add “Singleton” suffix to a function which returns a singleton to help aid WebKit static analyzers. It’s fairly common for some classes to provide a static member function which returns a singleton. Such a function typically holds NeverDestroyed instance of an object and it’s s