| 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 65d35a495c2bea315b815a173f321f985edba6f6..0a019eb29f34e52f661022f9e00a30cb60c982af 100644
|
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| @@ -724,6 +724,18 @@ void StyleEngine::setStatsEnabled(bool enabled)
|
| m_styleResolverStats->reset();
|
| }
|
|
|
| +void StyleEngine::purgeMemory(DeviceKind deviceKind)
|
| +{
|
| + if (m_documentStyleSheetCollection)
|
| + m_documentStyleSheetCollection->purgeMemory();
|
| + for (ShadowTreeStyleSheetCollection* collection : m_styleSheetCollectionMap.values())
|
| + collection->purgeMemory();
|
| + clearFontCache();
|
| + clearResolver();
|
| + m_textToSheetCache.clear();
|
| + m_sheetToTextCache.clear();
|
| +}
|
| +
|
| DEFINE_TRACE(StyleEngine)
|
| {
|
| #if ENABLE(OILPAN)
|
|
|