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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 1658923004: PurgeMemory. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 5d39309f4f86c0d347d0f69c12592cc623c8b452..0901cfe19b96ce28db5bf129e20d6e0fb5682b46 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1162,6 +1162,15 @@ void ResourceFetcher::DeadResourceStatsRecorder::update(RevalidationPolicy polic
}
}
+void ResourceFetcher::purgeMemory()
+{
+ if (isFetching())
+ stopFetching();
+ m_documentResources.clear();
+ m_validatedURLs.clear();
+ clearPreloads(ClearAllPreloads);
+}
+
DEFINE_TRACE(ResourceFetcher)
{
visitor->trace(m_context);
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.h ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698