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

Unified Diff: third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp

Issue 2003543002: media/track: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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/track/vtt/VTTScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp b/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp
index 423dce5c6df003f0b5be03b36184b9a6590d284d..22bd7765988405c9ae3d6d099d1d47abe77dae58 100644
--- a/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp
+++ b/third_party/WebKit/Source/core/html/track/vtt/VTTScanner.cpp
@@ -67,10 +67,10 @@ bool VTTScanner::scan(const LChar* characters, size_t charactersCount)
bool VTTScanner::scanRun(const Run& run, const String& toMatch)
{
- ASSERT(run.start() == getPosition());
- ASSERT(run.start() <= end());
- ASSERT(run.end() >= run.start());
- ASSERT(run.end() <= end());
+ DCHECK_EQ(run.start(), getPosition());
+ DCHECK_LE(run.start(), end());
+ DCHECK_GE(run.end(), run.start());
+ DCHECK_LE(run.end(), end());
size_t matchLength = run.length();
if (toMatch.length() > matchLength)
return false;
@@ -86,18 +86,18 @@ bool VTTScanner::scanRun(const Run& run, const String& toMatch)
void VTTScanner::skipRun(const Run& run)
{
- ASSERT(run.start() <= end());
- ASSERT(run.end() >= run.start());
- ASSERT(run.end() <= end());
+ DCHECK_LE(run.start(), end());
+ DCHECK_GE(run.end(), run.start());
+ DCHECK_LE(run.end(), end());
seekTo(run.end());
}
String VTTScanner::extractString(const Run& run)
{
- ASSERT(run.start() == getPosition());
- ASSERT(run.start() <= end());
- ASSERT(run.end() >= run.start());
- ASSERT(run.end() <= end());
+ DCHECK_EQ(run.start(), getPosition());
+ DCHECK_LE(run.start(), end());
+ DCHECK_GE(run.end(), run.start());
+ DCHECK_LE(run.end(), end());
String s;
if (m_is8Bit)
s = String(m_data.characters8, run.length());

Powered by Google App Engine
This is Rietveld 408576698