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

Unified Diff: third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp

Issue 2858963002: Replace ASSERT with DCHECK in core/ (Closed)
Patch Set: WorkerBackingThread Created 3 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/canvas/CanvasFontCache.cpp
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
index b10ef084d7aed00b4e6b6b16dae35fe386b0c581..f855d4768eef17e1eab4f1ee01cbf7b6e332b504 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasFontCache.cpp
@@ -58,7 +58,7 @@ bool CanvasFontCache::GetFontUsingDefaultStyle(const String& font_string,
HashMap<String, Font>::iterator i =
fonts_resolved_using_default_style_.find(font_string);
if (i != fonts_resolved_using_default_style_.end()) {
- ASSERT(font_lru_list_.Contains(font_string));
+ DCHECK(font_lru_list_.Contains(font_string));
font_lru_list_.erase(font_string);
font_lru_list_.insert(font_string);
resolved_font = i->value;
@@ -83,7 +83,7 @@ MutableStylePropertySet* CanvasFontCache::ParseFont(const String& font_string) {
MutableStylePropertySet* parsed_style;
MutableStylePropertyMap::iterator i = fetched_fonts_.find(font_string);
if (i != fetched_fonts_.end()) {
- ASSERT(font_lru_list_.Contains(font_string));
+ DCHECK(font_lru_list_.Contains(font_string));
parsed_style = i->value;
font_lru_list_.erase(font_string);
font_lru_list_.insert(font_string);
@@ -118,8 +118,8 @@ MutableStylePropertySet* CanvasFontCache::ParseFont(const String& font_string) {
}
void CanvasFontCache::DidProcessTask() {
- ASSERT(pruning_scheduled_);
- ASSERT(main_cache_purge_preventer_);
+ DCHECK(pruning_scheduled_);
+ DCHECK(main_cache_purge_preventer_);
while (fetched_fonts_.size() > MaxFonts()) {
fetched_fonts_.erase(font_lru_list_.front());
fonts_resolved_using_default_style_.erase(font_lru_list_.front());
@@ -133,7 +133,7 @@ void CanvasFontCache::DidProcessTask() {
void CanvasFontCache::SchedulePruningIfNeeded() {
if (pruning_scheduled_)
return;
- ASSERT(!main_cache_purge_preventer_);
+ DCHECK(!main_cache_purge_preventer_);
main_cache_purge_preventer_ = WTF::WrapUnique(new FontCachePurgePreventer);
Platform::Current()->CurrentThread()->AddTaskObserver(this);
pruning_scheduled_ = true;

Powered by Google App Engine
This is Rietveld 408576698