| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 if (iter == identifierMap->end()) | 283 if (iter == identifierMap->end()) |
| 284 return; | 284 return; |
| 285 | 285 |
| 286 // Get all cache identifiers associated with generator. | 286 // Get all cache identifiers associated with generator. |
| 287 Vector<typename U::KeyType> cacheIdentifierList; | 287 Vector<typename U::KeyType> cacheIdentifierList; |
| 288 copyToVector(iter->value, cacheIdentifierList); | 288 copyToVector(iter->value, cacheIdentifierList); |
| 289 | 289 |
| 290 // For each cache identifier find the corresponding CacheEntry and remove it. | 290 // For each cache identifier find the corresponding CacheEntry and remove it. |
| 291 for (size_t i = 0; i < cacheIdentifierList.size(); ++i) { | 291 for (size_t i = 0; i < cacheIdentifierList.size(); ++i) { |
| 292 ASSERT(cacheMap->contains(cacheIdentifierList[i])); | 292 ASSERT(cacheMap->contains(cacheIdentifierList[i])); |
| 293 const auto& cacheEntry = cacheMap->get(cacheIdentifierList[i]); | 293 const auto& cacheEntry = cacheMap->at(cacheIdentifierList[i]); |
| 294 ASSERT(!cacheEntry->useCount()); | 294 ASSERT(!cacheEntry->useCount()); |
| 295 removeFromCacheInternal(cacheEntry, cacheMap, identifierMap, deletionList); | 295 removeFromCacheInternal(cacheEntry, cacheMap, identifierMap, deletionList); |
| 296 } | 296 } |
| 297 } | 297 } |
| 298 | 298 |
| 299 void ImageDecodingStore::removeFromCacheListInternal( | 299 void ImageDecodingStore::removeFromCacheListInternal( |
| 300 const Vector<std::unique_ptr<CacheEntry>>& deletionList) { | 300 const Vector<std::unique_ptr<CacheEntry>>& deletionList) { |
| 301 for (size_t i = 0; i < deletionList.size(); ++i) | 301 for (size_t i = 0; i < deletionList.size(); ++i) |
| 302 m_orderedCacheList.remove(deletionList[i].get()); | 302 m_orderedCacheList.remove(deletionList[i].get()); |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |