[webkit-dev] Stop Using Raw Pointers & References in New Code

Geoffrey Garen ggaren at apple.com
Mon Jan 23 11:12:19 PST 2023


Is the idea that a checker failure should block landing a patch, or just that it should start a conversation with your patch reviewer about why this case is an exception?

Maybe the ’should’ clause in the error message could clarify.

In general, I do think it’s helpful to flag any new raw pointer usage in a member variable. But I also agree that it might not be practical to get that number to true zero.

Thanks,
Geoff

> On Jan 21, 2023, at 12:12 PM, Michael Catanzaro via webkit-dev <webkit-dev at lists.webkit.org> wrote:
> 
> On Fri, Jan 20 2023 at 06:15:38 PM -0800, Ryosuke Niwa via webkit-dev <webkit-dev at lists.webkit.org> wrote:
>> Here´s a PR to make the style checker look for raw pointers & references in data members: https://github.com/WebKit/WebKit/pull/8907
>> I suggest we land this PR in 5 business days from now on unless someone objects.
> 
> I'm not sure how this would work as a style check rule since there's always going to be exceptions. E.g. we probably don't want to convert GObject priv pointers to use CheckedRef: that would be silly.
> 
> I think we can follow this rule in most of WebCore and maybe most of WebKit and WTF as well. Probably not going to work for bmalloc. Not sure about JSC.
> 
> Michael
> 
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev





More information about the webkit-dev mailing list