Bug 28992 - Assertion failure in CompositeEditCommand::moveParagraphs() and crash in Node::nodeIndex() when pasting
Summary: Assertion failure in CompositeEditCommand::moveParagraphs() and crash in Node...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-09-04 16:53 PDT by Alexey Proskuryakov
Modified: 2009-10-02 14:34 PDT (History)
5 users (show)

See Also:


Attachments
reduced test case (will crash) (415 bytes, text/html)
2009-09-04 17:08 PDT, Alexey Proskuryakov
no flags Details
Patch (4.96 KB, patch)
2009-10-02 14:18 PDT, Enrica Casucci
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2009-09-04 16:53:10 PDT
Opening the attached test case results in a crash in release builds, or an assertion failure in debug:

#0	0x03b3d6df in WebCore::CompositeEditCommand::moveParagraphs at CompositeEditCommand.cpp:815
#1	0x03b3e21b in WebCore::CompositeEditCommand::moveParagraph at CompositeEditCommand.cpp:747
#2	0x042db177 in WebCore::ReplaceSelectionCommand::mergeEndIfNeeded at ReplaceSelectionCommand.cpp:699
#3	0x042df692 in WebCore::ReplaceSelectionCommand::doApply at ReplaceSelectionCommand.cpp:960
#4	0x03d37ae3 in WebCore::EditCommand::apply at EditCommand.cpp:91
#5	0x03d37b77 in WebCore::applyCommand at EditCommand.cpp:217
#6	0x03d47097 in WebCore::executeInsertFragment at EditorCommand.cpp:196
#7	0x03d47122 in WebCore::executeInsertHTML at EditorCommand.cpp:479
#8	0x03d43d1f in WebCore::Editor::Command::execute at EditorCommand.cpp:1504
#9	0x03c45edd in WebCore::Document::execCommand at Document.cpp:3241
#10	0x03f509a2 in WebCore::jsDocumentPrototypeFunctionExecCommand at JSDocument.cpp:1867

In real life, this happens when pasting into a contenteditable div.

<rdar://7148712>
Comment 1 Alexey Proskuryakov 2009-09-04 17:08:20 PDT
Created attachment 39102 [details]
reduced test case (will crash)
Comment 2 Enrica Casucci 2009-10-02 14:18:54 PDT
Created attachment 40545 [details]
Patch
Comment 3 Adele Peterson 2009-10-02 14:29:27 PDT
Comment on attachment 40545 [details]
Patch

r=me! I'll commit this.
Comment 4 Adele Peterson 2009-10-02 14:34:25 PDT
Committed revision 49041.