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

Unified Diff: Source/core/editing/DOMSelection.cpp

Issue 792013002: Make some Selection function arguments non-optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test Created 6 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
Index: Source/core/editing/DOMSelection.cpp
diff --git a/Source/core/editing/DOMSelection.cpp b/Source/core/editing/DOMSelection.cpp
index 6a8a63ea9014d7162c73f7c3fced15217a6cb5e4..25703e256911f5e5673ad5af24a39089b115e0d4 100644
--- a/Source/core/editing/DOMSelection.cpp
+++ b/Source/core/editing/DOMSelection.cpp
@@ -493,8 +493,7 @@ bool DOMSelection::containsNode(const Node* n, bool allowPartial) const
void DOMSelection::selectAllChildren(Node* n, ExceptionState& exceptionState)
{
- if (!n)
- return;
+ ASSERT(n);
// This doesn't (and shouldn't) select text node characters.
setBaseAndExtent(n, 0, n, n->countChildren(), exceptionState);
« no previous file with comments | « LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js ('k') | Source/core/editing/Selection.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698