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) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
5 | 5 |
6 This library is free software; you can redistribute it and/or | 6 This library is free software; you can redistribute it and/or |
7 modify it under the terms of the GNU Library General Public | 7 modify it under the terms of the GNU Library General Public |
8 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
9 version 2 of the License, or (at your option) any later version. | 9 version 2 of the License, or (at your option) any later version. |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 double m_lastDecodedAccessTime; // Used as a thrash guard | 81 double m_lastDecodedAccessTime; // Used as a thrash guard |
82 | 82 |
83 Member<MemoryCacheEntry> m_previousInLiveResourcesList; | 83 Member<MemoryCacheEntry> m_previousInLiveResourcesList; |
84 Member<MemoryCacheEntry> m_nextInLiveResourcesList; | 84 Member<MemoryCacheEntry> m_nextInLiveResourcesList; |
85 Member<MemoryCacheEntry> m_previousInAllResourcesList; | 85 Member<MemoryCacheEntry> m_previousInAllResourcesList; |
86 Member<MemoryCacheEntry> m_nextInAllResourcesList; | 86 Member<MemoryCacheEntry> m_nextInAllResourcesList; |
87 | 87 |
88 private: | 88 private: |
89 explicit MemoryCacheEntry(Resource*); | 89 explicit MemoryCacheEntry(Resource*); |
90 | 90 |
91 void clearResourceWeak(Visitor*); | |
92 | |
93 // Only one of |m_resource| or |m_resourceWeak| is used, based on | 91 // Only one of |m_resource| or |m_resourceWeak| is used, based on |
94 // RuntimeEnabledFeatures::weakMemoryCacheEnabled(). | 92 // RuntimeEnabledFeatures::weakMemoryCacheEnabled(). |
95 // TODO(hiroshige): this switching mechanism is added for a field trial | 93 // TODO(hiroshige): this switching mechanism is added for a field trial |
96 // for Weak MemoryCache (https://crbug.com/603462) and should be reverted | 94 // for Weak MemoryCache (https://crbug.com/603462) and should be reverted |
97 // at least before going stable. | 95 // at least before going stable. |
98 Member<Resource> m_resource; | 96 Member<Resource> m_resource; |
99 WeakMember<Resource> m_resourceWeak; | 97 WeakMember<Resource> m_resourceWeak; |
100 }; | 98 }; |
101 | 99 |
102 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry); | 100 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 // Returns the global cache. | 305 // Returns the global cache. |
308 CORE_EXPORT MemoryCache* memoryCache(); | 306 CORE_EXPORT MemoryCache* memoryCache(); |
309 | 307 |
310 // Sets the global cache, used to swap in a test instance. Returns the old | 308 // Sets the global cache, used to swap in a test instance. Returns the old |
311 // MemoryCache object. | 309 // MemoryCache object. |
312 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 310 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
313 | 311 |
314 } // namespace blink | 312 } // namespace blink |
315 | 313 |
316 #endif | 314 #endif |
OLD | NEW |