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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: rebase 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/fonts/FontCache.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
index 8e681d841b807900ed7933df72924c310aaea526..b35f94b8011db1f6a011261fab9d9c4c6493788d 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -223,7 +223,7 @@ ShapeCache* FontCache::GetShapeCache(const FallbackListCompositeKey& key) {
result = it->value.get();
}
- ASSERT(result);
+ DCHECK(result);
return result;
}
@@ -293,7 +293,7 @@ PassRefPtr<SimpleFontData> FontCache::FontDataFromFontPlatformData(
#if DCHECK_IS_ON()
if (should_retain == kDoNotRetain)
- ASSERT(purge_prevent_count_);
+ DCHECK(purge_prevent_count_);
#endif
return g_font_data_cache->Get(platform_data, should_retain,
@@ -332,7 +332,7 @@ SimpleFontData* FontCache::GetNonRetainedLastResortFallbackFont(
}
void FontCache::ReleaseFontData(const SimpleFontData* font_data) {
- ASSERT(g_font_data_cache);
+ DCHECK(g_font_data_cache);
g_font_data_cache->Release(font_data);
}
@@ -431,7 +431,7 @@ HeapHashSet<WeakMember<FontCacheClient>>& FontCacheClients() {
void FontCache::AddClient(FontCacheClient* client) {
CHECK(client);
- ASSERT(!FontCacheClients().Contains(client));
+ DCHECK(!FontCacheClients().Contains(client));
FontCacheClients().insert(client);
}
@@ -443,7 +443,7 @@ unsigned short FontCache::Generation() {
void FontCache::Invalidate() {
if (!g_invalidate_font_cache) {
- ASSERT(!g_font_platform_data_cache);
+ DCHECK(!g_font_platform_data_cache);
return;
}
@@ -484,7 +484,7 @@ void FontCache::CrashWithFontInfo(const FontDescription* font_description) {
void FontCache::DumpFontPlatformDataCache(
base::trace_event::ProcessMemoryDump* memory_dump) {
- ASSERT(IsMainThread());
+ DCHECK(IsMainThread());
if (!g_font_platform_data_cache)
return;
base::trace_event::MemoryAllocatorDump* dump =
@@ -498,7 +498,7 @@ void FontCache::DumpFontPlatformDataCache(
void FontCache::DumpShapeResultCache(
base::trace_event::ProcessMemoryDump* memory_dump) {
- ASSERT(IsMainThread());
+ DCHECK(IsMainThread());
if (!g_fallback_list_shaper_cache) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698