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

Side by Side Diff: Source/WebCore/loader/cache/MemoryCache.cpp

Issue 9283038: Merge 105226 - Ensure we don't cancel revalidation of a CachedResource (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/loader/cache/CachedResource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 resource->setInCache(true); 113 resource->setInCache(true);
114 resource->updateResponseAfterRevalidation(response); 114 resource->updateResponseAfterRevalidation(response);
115 insertInLRUList(resource); 115 insertInLRUList(resource);
116 int delta = resource->size(); 116 int delta = resource->size();
117 if (resource->decodedSize() && resource->hasClients()) 117 if (resource->decodedSize() && resource->hasClients())
118 insertInLiveDecodedResourcesList(resource); 118 insertInLiveDecodedResourcesList(resource);
119 if (delta) 119 if (delta)
120 adjustSize(resource->hasClients(), delta); 120 adjustSize(resource->hasClients(), delta);
121 121
122 revalidatingResource->switchClientsToRevalidatedResource(); 122 revalidatingResource->switchClientsToRevalidatedResource();
123 ASSERT(!revalidatingResource->m_deleted);
123 // this deletes the revalidating resource 124 // this deletes the revalidating resource
124 revalidatingResource->clearResourceToRevalidate(); 125 revalidatingResource->clearResourceToRevalidate();
125 } 126 }
126 127
127 void MemoryCache::revalidationFailed(CachedResource* revalidatingResource) 128 void MemoryCache::revalidationFailed(CachedResource* revalidatingResource)
128 { 129 {
129 LOG(ResourceLoading, "Revalidation failed for %p", revalidatingResource); 130 LOG(ResourceLoading, "Revalidation failed for %p", revalidatingResource);
130 ASSERT(revalidatingResource->resourceToRevalidate()); 131 ASSERT(revalidatingResource->resourceToRevalidate());
131 revalidatingResource->clearResourceToRevalidate(); 132 revalidatingResource->clearResourceToRevalidate();
132 } 133 }
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 if (includeLive || !current->hasClients()) 743 if (includeLive || !current->hasClients())
743 printf("(%.1fK, %.1fK, %uA, %dR, %d, %d); ", current->decodedSiz e() / 1024.0f, (current->encodedSize() + current->overheadSize()) / 1024.0f, cur rent->accessCount(), current->hasClients(), current->isPurgeable(), current->was Purged()); 744 printf("(%.1fK, %.1fK, %uA, %dR, %d, %d); ", current->decodedSiz e() / 1024.0f, (current->encodedSize() + current->overheadSize()) / 1024.0f, cur rent->accessCount(), current->hasClients(), current->isPurgeable(), current->was Purged());
744 745
745 current = prev; 746 current = prev;
746 } 747 }
747 } 748 }
748 } 749 }
749 #endif 750 #endif
750 751
751 } // namespace WebCore 752 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/cache/CachedResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698