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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 MemoryCacheEntry* entry = getEntryForResource(resource); | 628 MemoryCacheEntry* entry = getEntryForResource(resource); |
629 if (!entry) | 629 if (!entry) |
630 return MemoryCacheLiveResourcePriorityUnknown; | 630 return MemoryCacheLiveResourcePriorityUnknown; |
631 return entry->m_liveResourcePriority; | 631 return entry->m_liveResourcePriority; |
632 } | 632 } |
633 | 633 |
634 void MemoryCache::removeURLFromCache(ExecutionContext* context, const KURL& url) | 634 void MemoryCache::removeURLFromCache(ExecutionContext* context, const KURL& url) |
635 { | 635 { |
636 if (context->isWorkerGlobalScope()) { | 636 if (context->isWorkerGlobalScope()) { |
637 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); | 637 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); |
638 workerGlobalScope->thread()->workerLoaderProxy().postTaskToLoader(create
CrossThreadTask(&removeURLFromCacheInternal, url)); | 638 workerGlobalScope->thread()->workerLoaderProxy()->postTaskToLoader(creat
eCrossThreadTask(&removeURLFromCacheInternal, url)); |
639 return; | 639 return; |
640 } | 640 } |
641 removeURLFromCacheInternal(context, url); | 641 removeURLFromCacheInternal(context, url); |
642 } | 642 } |
643 | 643 |
644 void MemoryCache::removeURLFromCacheInternal(ExecutionContext*, const KURL& url) | 644 void MemoryCache::removeURLFromCacheInternal(ExecutionContext*, const KURL& url) |
645 { | 645 { |
646 WillBeHeapVector<Member<Resource>> resources = memoryCache()->resourcesForUR
L(url); | 646 WillBeHeapVector<Member<Resource>> resources = memoryCache()->resourcesForUR
L(url); |
647 for (Resource* resource : resources) | 647 for (Resource* resource : resources) |
648 memoryCache()->remove(resource); | 648 memoryCache()->remove(resource); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 printf("(%.1fK, %.1fK, %uA, %dR, %d, %d); ", currentResource->de
codedSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overhe
adSize()) / 1024.0f, current->m_accessCount, currentResource->hasClients(), curr
entResource->isPurgeable(), currentResource->wasPurged()); | 855 printf("(%.1fK, %.1fK, %uA, %dR, %d, %d); ", currentResource->de
codedSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overhe
adSize()) / 1024.0f, current->m_accessCount, currentResource->hasClients(), curr
entResource->isPurgeable(), currentResource->wasPurged()); |
856 | 856 |
857 current = current->m_previousInAllResourcesList; | 857 current = current->m_previousInAllResourcesList; |
858 } | 858 } |
859 } | 859 } |
860 } | 860 } |
861 | 861 |
862 #endif // MEMORY_CACHE_STATS | 862 #endif // MEMORY_CACHE_STATS |
863 | 863 |
864 } // namespace blink | 864 } // namespace blink |
OLD | NEW |