[webkit-reviews] review denied: [Bug 207600] Nullptr crash in EditCommand::EditCommand via CompositeEditCommand::removeNode : [Attachment 397526] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 27 09:44:24 PDT 2020


Geoffrey Garen <ggaren at apple.com> has denied Jack <shihchieh_lee at apple.com>'s
request for review:
Bug 207600: Nullptr crash in EditCommand::EditCommand via
CompositeEditCommand::removeNode
https://bugs.webkit.org/show_bug.cgi?id=207600

Attachment 397526: Patch

https://bugs.webkit.org/attachment.cgi?id=397526&action=review




--- Comment #41 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 397526
  --> https://bugs.webkit.org/attachment.cgi?id=397526
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=397526&action=review

I think this patch is ready, but I spotted two details that could use tidying.

> Source/WebCore/editing/FrameSelection.h:143
> +    WEBCORE_EXPORT explicit FrameSelection(Document* = nullptr);

Is there actually a case where someone constructs a FrameSelection with a null
Document? Since FrameSelection is now a data member of Document, I think we
always have a Document. If so, it would be better to change the type of the
constructor argument and data member to Document&.

> Source/WebCore/editing/FrameSelection.h:342
>      Frame* m_frame;

Can you remove the m_frame data member now? Anything that used to use m_frame
should ideally be gone now. If uses remain, they should use m_document->frame()
will a null check.


More information about the webkit-reviews mailing list