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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 months 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/html/HTMLFormControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
index 15ef8c2b7a7b15a0a89f63eff0d9b7c614d74207..2d79e50931fd8a2699b4b7b4d5028106276ecfe9 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
@@ -449,7 +449,7 @@ bool HTMLFormControlElement::willValidate() const
// If the following assertion fails, setNeedsWillValidateCheck() is not
// called correctly when something which changes recalcWillValidate() result
// is updated.
- ASSERT(m_willValidate == recalcWillValidate());
+ DCHECK_EQ(m_willValidate, recalcWillValidate());
}
return m_willValidate;
}
@@ -564,8 +564,8 @@ bool HTMLFormControlElement::reportValidity()
bool isValid = checkValidity(&unhandledInvalidControls, CheckValidityDispatchInvalidEvent);
if (isValid || unhandledInvalidControls.isEmpty())
return isValid;
- ASSERT(unhandledInvalidControls.size() == 1);
- ASSERT(unhandledInvalidControls[0].get() == this);
+ DCHECK_EQ(unhandledInvalidControls.size(), 1u);
+ DCHECK_EQ(unhandledInvalidControls[0].get(), this);
// Update layout now before calling isFocusable(), which has
// !layoutObject()->needsLayout() assertion.
document().updateStyleAndLayoutIgnorePendingStylesheets();
@@ -594,7 +594,7 @@ bool HTMLFormControlElement::isValidElement()
} else {
// If the following assertion fails, setNeedsValidityCheck() is not
// called correctly when something which changes validity is updated.
- ASSERT(m_isValid == (!willValidate() || valid()));
+ DCHECK_EQ(m_isValid, (!willValidate() || valid()));
}
return m_isValid;
}

Powered by Google App Engine
This is Rietveld 408576698