Index: Source/core/editing/ApplyBlockElementCommand.cpp |
diff --git a/Source/core/editing/ApplyBlockElementCommand.cpp b/Source/core/editing/ApplyBlockElementCommand.cpp |
index 938ee5b9abc1f9acbd1163f0e59c3695a3870cdc..c58af8cef1c0ae06bcfc2e61e59d1071658e55fe 100644 |
--- a/Source/core/editing/ApplyBlockElementCommand.cpp |
+++ b/Source/core/editing/ApplyBlockElementCommand.cpp |
@@ -146,11 +146,9 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel |
if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().inDocument()) |
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().inDocument()) { |
- ASSERT_NOT_REACHED(); |
+ // If somehow, e.g. mutation event handler, we did, return to prevent crashes. |
+ if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().inDocument()) |
return; |
- } |
endOfCurrentParagraph = endOfNextParagraph; |
} |
} |