Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Source/WebCore/editing/ApplyBlockElementCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,9 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().anchorNode()->isConnected())
break;
// Sanity check: Make sure our moveParagraph calls didn't remove endOfNextParagraph.deepEquivalent().deprecatedNode()
// If somehow we did, return to prevent crashes.
if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->isConnected()) {
ASSERT_NOT_REACHED();
// If somehow, e.g. mutation event handler, we did, return to prevent crashes.
if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().anchorNode()->isConnected())
return;
}
endOfCurrentParagraph = endOfNextParagraph;
}
}
Expand Down