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

Unified Diff: third_party/WebKit/Source/core/loader/resource/FontResource.cpp

Issue 2558433002: FontResource: use DCHECKs for confirmed CHECKs (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/resource/FontResource.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/FontResource.cpp b/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
index 3018c7641efdce176613b75674222240201b7b13..83bc36a9cb1cff26526e46e86d39edb96e84f528 100644
--- a/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
@@ -105,19 +105,15 @@ void FontResource::didAddClient(ResourceClient* c) {
void FontResource::setRevalidatingRequest(const ResourceRequest& request) {
// Reload will use the same object, and needs to reset |m_loadLimitState|
// before any didAddClient() is called again.
- // TODO(toyoshim): Change following CHECKs to DCHECKs once we confirm these do
- // not fire.
- CHECK(isLoaded());
- CHECK(!m_fontLoadShortLimitTimer.isActive());
- CHECK(!m_fontLoadLongLimitTimer.isActive());
+ DCHECK(isLoaded());
+ DCHECK(!m_fontLoadShortLimitTimer.isActive());
+ DCHECK(!m_fontLoadLongLimitTimer.isActive());
m_loadLimitState = LoadNotStarted;
Resource::setRevalidatingRequest(request);
}
void FontResource::startLoadLimitTimers() {
- // TODO(toyoshim): Change CHECK() to DCHECK() if this can survive on Canary
- // for some days. http://crbug.com/670638
- CHECK(isLoading());
+ DCHECK(isLoading());
DCHECK_EQ(m_loadLimitState, LoadNotStarted);
m_loadLimitState = UnderLimit;
m_fontLoadShortLimitTimer.startOneShot(fontLoadWaitShortLimitSec,
@@ -151,11 +147,7 @@ FontPlatformData FontResource::platformDataFromCustomData(
}
void FontResource::fontLoadShortLimitCallback(TimerBase*) {
- // TODO(toyoshim): Change CHECK() to DCHECK() and remove if(!isLoading()) if
- // this can survive on Canary for some days. http://crbug.com/670638
- CHECK(isLoading());
- if (!isLoading())
- return;
+ DCHECK(isLoading());
DCHECK_EQ(m_loadLimitState, UnderLimit);
m_loadLimitState = ShortLimitExceeded;
ResourceClientWalker<FontResourceClient> walker(clients());
@@ -164,11 +156,7 @@ void FontResource::fontLoadShortLimitCallback(TimerBase*) {
}
void FontResource::fontLoadLongLimitCallback(TimerBase*) {
- // TODO(toyoshim): Change CHECK() to DCHECK() and remove if(!isLoading()) if
- // this can survive on Canary for some days. http://crbug.com/670638
- CHECK(isLoading());
- if (!isLoading())
- return;
+ DCHECK(isLoading());
DCHECK_EQ(m_loadLimitState, ShortLimitExceeded);
m_loadLimitState = LongLimitExceeded;
ResourceClientWalker<FontResourceClient> walker(clients());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698