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

Unified Diff: third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp

Issue 2551823002: RemoteFontFaceSource should not call startLoadLimitTimers() if startLoad() fails (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/css/RemoteFontFaceSource.cpp
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
index 1427b5237256d7dc87ead3b10b6919aa544ed0b7..07f20aa542a8df54865c02452a38059e94766d67 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -249,10 +249,12 @@ void RemoteFontFaceSource::beginLoadIfNeeded() {
// for painting the text.
m_font->didChangePriority(ResourceLoadPriorityVeryLow, 0);
}
- m_fontSelector->document()->fetcher()->startLoad(m_font);
- if (!m_font->isLoaded())
- m_font->startLoadLimitTimers();
- m_histograms.loadStarted();
+ if (m_fontSelector->document()->fetcher()->startLoad(m_font)) {
+ // Start timers only when load is actually started asynchronously.
+ if (!m_font->isLoaded())
+ m_font->startLoadLimitTimers();
+ m_histograms.loadStarted();
+ }
}
if (m_face)
« 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