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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 2 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/editing/iterators/TextIteratorTextState.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
index 0b663336eb447d0f34300cc2249ac41403b7022b..5e45a354e2b5a33de171bf796289b2a97aa7bf2d 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
@@ -42,7 +42,7 @@ TextIteratorTextState::TextIteratorTextState(bool emitsOriginalText)
m_emitsOriginalText(emitsOriginalText) {}
UChar TextIteratorTextState::characterAt(unsigned index) const {
- ASSERT_WITH_SECURITY_IMPLICATION(index < static_cast<unsigned>(length()));
+ SECURITY_DCHECK(index < static_cast<unsigned>(length()));
if (!(index < static_cast<unsigned>(length())))
return 0;
@@ -57,10 +57,8 @@ UChar TextIteratorTextState::characterAt(unsigned index) const {
String TextIteratorTextState::substring(unsigned position,
unsigned length) const {
- ASSERT_WITH_SECURITY_IMPLICATION(position <=
- static_cast<unsigned>(this->length()));
- ASSERT_WITH_SECURITY_IMPLICATION(position + length <=
- static_cast<unsigned>(this->length()));
+ SECURITY_DCHECK(position <= static_cast<unsigned>(this->length()));
+ SECURITY_DCHECK(position + length <= static_cast<unsigned>(this->length()));
if (!length)
return emptyString();
if (m_singleCharacterBuffer) {
@@ -168,10 +166,9 @@ void TextIteratorTextState::emitText(Node* textNode,
void TextIteratorTextState::appendTextTo(ForwardsTextBuffer* output,
unsigned position,
unsigned lengthToAppend) const {
- ASSERT_WITH_SECURITY_IMPLICATION(position + lengthToAppend <=
- static_cast<unsigned>(length()));
+ SECURITY_DCHECK(position + lengthToAppend <= static_cast<unsigned>(length()));
// Make sure there's no integer overflow.
- ASSERT_WITH_SECURITY_IMPLICATION(position + lengthToAppend >= position);
+ SECURITY_DCHECK(position + lengthToAppend >= position);
if (!lengthToAppend)
return;
DCHECK(output);

Powered by Google App Engine
This is Rietveld 408576698