Bug 220630 - Crash from CompositeEditCommand::moveParagraphs() being passed null end
Summary: Crash from CompositeEditCommand::moveParagraphs() being passed null end
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 218495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-14 12:03 PST by Julian Gonzalez
Modified: 2021-01-20 18:43 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.94 KB, patch)
2021-01-14 12:09 PST, Julian Gonzalez
no flags Details | Formatted Diff | Diff
Patch (4.87 KB, patch)
2021-01-14 17:48 PST, Julian Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Gonzalez 2021-01-14 12:03:32 PST
frame #0: WebCore`WTF::Optional<WebCore::SimpleRange>::operator*() &&+46
frame #1: WebCore`WebCore::CompositeEditCommand::moveParagraphs(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&, WebCore::VisiblePosition const&, bool, bool)+2041
frame #2: WebCore`WebCore::InsertListCommand::unlistifyParagraph(WebCore::VisiblePosition const&, WebCore::HTMLElement*, WebCore::Node*)+2703
frame #3: WebCore`WebCore::InsertListCommand::doApplyForSingleParagraph(bool, WebCore::HTMLQualifiedName const&, WebCore::SimpleRange&)+3029
frame #4: WebCore`WebCore::InsertListCommand::doApply()+3303
frame #5: WebCore`WebCore::CompositeEditCommand::applyCommandToComposite(WTF::Ref<WebCore::EditCommand, WTF::RawPtrTraits<WebCore::EditCommand> >&&)+107
frame #6: WebCore`WebCore::IndentOutdentCommand::outdentParagraph()+860
frame #7: WebCore`WebCore::IndentOutdentCommand::outdentRegion(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&)+1386
frame #8: WebCore`WebCore::IndentOutdentCommand::formatSelection(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&)+48
frame #9: WebCore`WebCore::ApplyBlockElementCommand::doApply()+1114
frame #10: WebCore`WebCore::CompositeEditCommand::apply()+535
frame #11: WebCore`WebCore::executeOutdent(WebCore::Frame&, WebCore::Event*, WebCore::EditorCommandSource, WTF::String const&)+204

<rdar://problem/72223506>
Comment 1 Julian Gonzalez 2021-01-14 12:09:40 PST
Created attachment 417641 [details]
Patch
Comment 2 Ryosuke Niwa 2021-01-14 17:25:24 PST
Comment on attachment 417641 [details]
Patch

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

> Source/WebCore/editing/InsertListCommand.cpp:303
> +    // Make sure there are valid positions in the paragraph to move.

I don't think this comment is necessary. It's pretty evident from the code why we'd have to check it here.
Comment 3 Julian Gonzalez 2021-01-14 17:47:46 PST
(In reply to Ryosuke Niwa from comment #2)
> Comment on attachment 417641 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=417641&action=review
> 
> > Source/WebCore/editing/InsertListCommand.cpp:303
> > +    // Make sure there are valid positions in the paragraph to move.
> 
> I don't think this comment is necessary. It's pretty evident from the code
> why we'd have to check it here.

Removing the comment.
Comment 4 Julian Gonzalez 2021-01-14 17:48:07 PST
Created attachment 417672 [details]
Patch
Comment 5 EWS 2021-01-14 23:14:52 PST
Committed r271510: <https://trac.webkit.org/changeset/271510>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417672 [details].
Comment 6 Ryosuke Niwa 2021-01-20 18:43:27 PST
*** Bug 218495 has been marked as a duplicate of this bug. ***