[Webkit-unassigned] [Bug 224941] Crash in BreakBlockquoteCommand::doApply()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 24 15:28:08 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=224941

--- Comment #10 from Ryosuke Niwa <rniwa at webkit.org> ---
(In reply to Darin Adler from comment #9)
> Comment on attachment 426945 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426945&action=review
> 
> >> Source/WebCore/editing/BreakBlockquoteCommand.cpp:112
> >> +            if (auto nextNode = NodeTraversal::next(*startNode))
> > 
> > This is a bit misleading. This should be either auto* or we should be calling makeRefPtr & WTFMove(nextNode) below
> 
> This is an interesting new coding style idea/rule that I have never heard
> before.
> 
> I often use auto for types that are raw pointers. I know some people prefer
> using auto*, but this is not a preference I share.

Oh really? I thought we always used auto* for pointer types but I guess I stand corrected.

> Ryosuke, are you going even further and suggesting that, due to the risk of
> thinking that something is a safer smart pointer, we should have a style
> rule to never use "auto" for a raw pointer?

I'm not suggesting. I thought that was the existing convention / rule but I guess it's not codified anywhere. It's probably a good practice although clang static analyzer might make it obsolete since it can automatically detect pointer types based on the actual type interference.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210424/fcea70d9/attachment-0001.htm>


More information about the webkit-unassigned mailing list