Skip to content

Commit

Permalink
Always remove errored Resource from MemoryCache
Browse files Browse the repository at this point in the history
Previously, preloaded Resources are not evicted from MemoryCache
in some cases, even when it is errored, in order to prevent
duplicated requests to an errored URL (once as a preloading request and
once as a non-preloading request). But now this exception is not
needed because Issue 652228 made preload matching done outside
MemoryCache.

This CL removes that exception and makes errored Resources always
evicted from MemoryCache.

Bug: 652228
Change-Id: I706b733574f9a753cb8d001a2be53f78b0d9933c
Reviewed-on: https://chromium-review.googlesource.com/721845
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509506}
  • Loading branch information
hiroshige-g authored and Commit Bot committed Oct 17, 2017
1 parent c816243 commit 1cf33a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void Resource::FinishAsError(const ResourceError& error,
error_ = error;
is_revalidating_ = false;

if ((error_.IsCancellation() || !is_unused_preload_) && IsMainThread())
if (IsMainThread())
GetMemoryCache()->Remove(this);

if (!ErrorOccurred())
Expand Down

0 comments on commit 1cf33a3

Please sign in to comment.