Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Issue 2595783002: [Editing] Add null check in |DeleteSelectionCommand::removeRedundantBlocks()| (Closed)
Patch Set: dominicc's suggestion: Use unit test instead of layout test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/ApplyStyleCommandTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index 2f1bc1a12e1d5855f2fac0a965b1c7f7d27a2b54..028d0fb5d524f8d4873d2d2c038af0d6c9eab5d6 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -1022,6 +1022,7 @@ void DeleteSelectionCommand::removeRedundantBlocks(EditingState* editingState) {
Element* rootElement = rootEditableElement(*node);
while (node != rootElement) {
+ ABORT_EDITING_COMMAND_IF(!node);
if (isRemovableBlock(node)) {
if (node == m_endingPosition.anchorNode())
updatePositionForNodeRemovalPreservingChildren(m_endingPosition, *node);
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/ApplyStyleCommandTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698