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

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

Issue 723423002: Clear ResourceFetcher::m_validatedURLs if too many entries are added (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 68f29110590e6be5b393177aaab507a390eda98f..4a39eb603a850d723a5ae45a5c3ece1a0737ff58 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -694,6 +694,9 @@ void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest&
m_resourceTimingReportTimer.startOneShot(0, FROM_HERE);
}
+ if (m_validatedURLs.size() >= 10000) {
+ m_validatedURLs.clear();
kouhei (in TOK) 2014/11/14 08:37:51 Can we have a ring buffer instead?
hiroshige 2014/11/14 09:02:05 Done.
kouhei (in TOK) 2014/11/14 09:15:57 Sorry, I guess this is a better approach for now.
hiroshige 2014/11/14 09:29:21 Done in Patch Set 3.
+ }
m_validatedURLs.add(request.resourceRequest().url());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698