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

Unified Diff: Source/core/loader/cache/CachedResourceLoader.cpp

Issue 19597008: If a resource load is started as the CachedResourceLoader is going away, make sure we remove the Ca… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« 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/loader/cache/CachedResourceLoader.cpp
diff --git a/Source/core/loader/cache/CachedResourceLoader.cpp b/Source/core/loader/cache/CachedResourceLoader.cpp
index d06f008c4085c53f49718bea157d282278a22822..c2c8fff0318d23cd64c675fe0482975764455f2e 100644
--- a/Source/core/loader/cache/CachedResourceLoader.cpp
+++ b/Source/core/loader/cache/CachedResourceLoader.cpp
@@ -500,12 +500,11 @@ CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(Cache
}
if ((policy != Use || resource->stillNeedsLoad()) && CachedResourceRequest::NoDefer == request.defer()) {
- if (!frame())
- return 0;
-
- FrameLoader* frameLoader = this->frameLoader();
- if (request.options().securityCheck == DoSecurityCheck && (frameLoader->state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || frameLoader->activeDocumentLoader()->isStopping()))
+ if (!frame() || m_documentLoader != frame()->loader()->activeDocumentLoader() || m_documentLoader->isStopping()) {
Nate Chapin 2013/07/23 23:13:17 I believe the last 2 cases are a more succinct and
+ if (resource->inCache())
+ memoryCache()->remove(resource.get());
return 0;
+ }
if (!m_documentLoader->scheduleArchiveLoad(resource.get(), request.resourceRequest()))
resource->load(this, request.options());
« 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