OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |