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

Unified Diff: third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h

Issue 2811453002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text Created 3 years, 8 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/platform/text/DecodeEscapeSequences.h
diff --git a/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h b/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
index b0db6fc35962fd7845299d6315aa2373c4a59eee..9313ef9914bed3fe5f024b4666b858db0cddf76a 100644
--- a/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
+++ b/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
@@ -139,8 +139,8 @@ struct URLEscapeSequence {
run += 1;
}
}
- ASSERT(
- buffer.size() >=
+ DCHECK_GE(
+ buffer.size(),
static_cast<size_t>(p - buffer.data())); // Prove buffer not overrun.
return (encoding.isValid() ? encoding : UTF8Encoding())
.decode(buffer.data(), p - buffer.data());

Powered by Google App Engine
This is Rietveld 408576698