[Webkit-unassigned] [Bug 218215] Null dereference in CompositeEditCommand::splitTreeToNode() due to not checking for top of DOM tree

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 9 12:18:05 PST 2020


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

--- Comment #17 from Julian Gonzalez <julian_a_gonzalez at apple.com> ---
(In reply to Alex Christensen from comment #14)
> Comment on attachment 413379 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=413379&action=review
> 
> >> Source/WebCore/editing/InsertListCommand.cpp:325
> >> +        if (listChildNodeParentNode && listChildNodeParentNode != listNode)
> > 
> > Declare the variable in if as in:
> > if (auto listChildNodeParentNode = ~; listChildNodeParentNode != listNode)
> 
> if (auto listChildNodeParentNode = makeRefPtr(listChildNode->parentNode());
> listChildNodeParentNode && listChildNodeParentNode != listNode)
> 
> Hooray C++17!

Upgrading my mental C++ model is a slow process :) Thank you both.

-- 
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/20201109/cd2febc2/attachment-0001.htm>


More information about the webkit-unassigned mailing list