| 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..092092466afaa358fb81b3ad3c922d1aae6681a4 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/CompressableString.h"
|
| #include "public/platform/Platform.h"
|
|
|
| namespace blink {
|
| @@ -540,13 +541,16 @@ 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();
|
| + }
|
| }
|
| +
|
| + if (frame->isLocalFrame())
|
| + toLocalFrame(frame)->compressStrings();
|
| }
|
|
|
| DEFINE_TRACE(Page)
|
|
|