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 |
91 // Only one of |m_resource| or |m_resourceWeak| is used, based on | 93 // Only one of |m_resource| or |m_resourceWeak| is used, based on |
92 // RuntimeEnabledFeatures::weakMemoryCacheEnabled(). | 94 // RuntimeEnabledFeatures::weakMemoryCacheEnabled(). |
93 // TODO(hiroshige): this switching mechanism is added for a field trial | 95 // TODO(hiroshige): this switching mechanism is added for a field trial |
94 // for Weak MemoryCache (https://crbug.com/603462) and should be reverted | 96 // for Weak MemoryCache (https://crbug.com/603462) and should be reverted |
95 // at least before going stable. | 97 // at least before going stable. |
96 Member<Resource> m_resource; | 98 Member<Resource> m_resource; |
97 WeakMember<Resource> m_resourceWeak; | 99 WeakMember<Resource> m_resourceWeak; |
98 }; | 100 }; |
99 | 101 |
100 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry); | 102 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // Returns the global cache. | 307 // Returns the global cache. |
306 CORE_EXPORT MemoryCache* memoryCache(); | 308 CORE_EXPORT MemoryCache* memoryCache(); |
307 | 309 |
308 // Sets the global cache, used to swap in a test instance. Returns the old | 310 // Sets the global cache, used to swap in a test instance. Returns the old |
309 // MemoryCache object. | 311 // MemoryCache object. |
310 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 312 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
311 | 313 |
312 } // namespace blink | 314 } // namespace blink |
313 | 315 |
314 #endif | 316 #endif |
OLD | NEW |