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/page/Page.cpp

Issue 1428383002: Make ResourceFetcher::m_documentResources use WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODOs Created 5 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
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 c2aec15d51f94d785866decebb08206ab158c2aa..9a166096c1d2e56a13f11a30d4b6d9824e89faea 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -514,12 +514,8 @@ void Page::acceptLanguagesChanged()
void Page::purgeMemory(DeviceKind deviceKind)
{
- Frame* frame = mainFrame();
- if (deviceKind != DeviceKind::LowEnd || !frame || !frame->isLocalFrame())
- return;
- if (Document* document = toLocalFrame(frame)->document())
- document->fetcher()->garbageCollectDocumentResources();
- memoryCache()->pruneAll();
+ if (deviceKind == DeviceKind::LowEnd)
+ memoryCache()->pruneAll();
}
DEFINE_TRACE(Page)

Powered by Google App Engine
This is Rietveld 408576698