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

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

Issue 1511913002: Drop [LegacyInterfaceTypeChecking] for Selection.prototype.addRange (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: 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.");

Powered by Google App Engine
This is Rietveld 408576698