Chromium Code Reviews| Index: third_party/WebKit/Source/core/page/Page.cpp |
| diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp |
| index a282c4cd654a998ee7201054f1e7b3031e22c9e3..83f657b3f9e804602490581d37215e72fecce833 100644 |
| --- a/third_party/WebKit/Source/core/page/Page.cpp |
| +++ b/third_party/WebKit/Source/core/page/Page.cpp |
| @@ -51,6 +51,7 @@ |
| #include "core/paint/PaintLayer.h" |
| #include "platform/graphics/GraphicsLayer.h" |
| #include "platform/plugins/PluginData.h" |
| +#include "platform/text/CompressibleString.h" |
| #include "public/platform/Platform.h" |
| namespace blink { |
| @@ -540,13 +541,15 @@ void Page::acceptLanguagesChanged() |
| void Page::purgeMemory(MemoryPurgeMode mode, DeviceKind deviceKind) |
| { |
| Frame* frame = mainFrame(); |
| - if (deviceKind != DeviceKind::LowEnd || !frame || !frame->isLocalFrame()) |
| - return; |
| - if (mode == MemoryPurgeMode::InactiveTab) { |
| - if (Document* document = toLocalFrame(frame)->document()) |
| - document->fetcher()->garbageCollectDocumentResources(); |
| - memoryCache()->pruneAll(); |
| + if (deviceKind == DeviceKind::LowEnd && frame && frame->isLocalFrame()) { |
| + if (mode == MemoryPurgeMode::InactiveTab) { |
| + if (Document* document = toLocalFrame(frame)->document()) |
| + document->fetcher()->garbageCollectDocumentResources(); |
| + memoryCache()->pruneAll(); |
| + } |
| } |
| + |
| + CompressibleStringImpl::purgeMemory(); |
|
haraken
2015/11/26 11:50:03
I'd propose to introduce a separate method for doi
|
| } |
| DEFINE_TRACE(Page) |