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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2622673003: Try to do less work clearing the font-cache in StyleEngine::didDetach. (Closed)
Patch Set: Created 3 years, 11 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
« 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/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index b225c0941afb20b79e1157522a89e75d7fd1788c..a708c8a72be49402c2b1954bd4468e06f505b74a 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -451,7 +451,9 @@ void StyleEngine::didDetach() {
m_activeTreeScopes.clear();
m_viewportResolver = nullptr;
m_mediaQueryEvaluator = nullptr;
- clearFontCache();
+ if (m_fontSelector)
+ m_fontSelector->fontFaceCache()->clearAll();
+ m_fontSelector = nullptr;
}
void StyleEngine::clearFontCache() {
« 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