Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp |
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
index 5578cccf233a3cf544baec14ce8238e1264d8b72..d1d378ff0f4071771e4965932dcb043b64f536bd 100644 |
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
@@ -393,14 +393,10 @@ void DOMSelection::removeAllRanges() |
void DOMSelection::addRange(Range* newRange) |
{ |
- if (!m_frame) |
- return; |
+ ASSERT(newRange); |
- // FIXME: Should we throw DOMException for error cases below? |
- if (!newRange) { |
- addConsoleError("The given range is null."); |
+ if (!m_frame) |
return; |
- } |
if (!newRange->inDocument()) { |
addConsoleError("The given range isn't in document."); |