Chromium Code Reviews| Index: third_party/WebKit/Source/platform/loader/fetch/Resource.cpp |
| diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp |
| index b9ca511a440f70a889ed14322f88ece836b07c6f..ae82b2da366f831339678adba4083a6568d850ac 100644 |
| --- a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp |
| +++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp |
| @@ -42,6 +42,7 @@ |
| #include "platform/loader/fetch/MemoryCache.h" |
| #include "platform/loader/fetch/ResourceClient.h" |
| #include "platform/loader/fetch/ResourceClientWalker.h" |
| +#include "platform/loader/fetch/ResourceFetcher.h" |
| #include "platform/loader/fetch/ResourceLoader.h" |
| #include "platform/network/HTTPParsers.h" |
| #include "platform/scheduler/child/web_scheduler.h" |
| @@ -418,8 +419,11 @@ void Resource::GetError(const ResourceError& error) { |
| error_ = error; |
| is_revalidating_ = false; |
| - if (error_.IsCancellation() || !IsPreloaded()) |
| + if (error_.IsCancellation() || !IsPreloaded()) { |
| GetMemoryCache()->Remove(this); |
| + if (loader_) |
| + loader_->Fetcher()->RemovePreload(this); |
|
Nate Chapin
2017/05/02 00:02:16
I think this can move to ResourceFetcher::HandleLo
yhirano
2017/05/02 10:22:17
Done.
|
| + } |
| if (!ErrorOccurred()) |
| SetStatus(ResourceStatus::kLoadError); |