Commit 1cf33a33 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

Always remove errored Resource from MemoryCache

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/721845Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509506}
parent c8162431
......@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment