| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All rights reserved. |
| 4 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 6 * |
| 6 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 9 * 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. |
| 10 * | 11 * |
| 11 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (!ThreadHeap::isHeapObjectAlive(matchedProperties.properties)) { | 74 if (!ThreadHeap::isHeapObjectAlive(matchedProperties.properties)) { |
| 74 // For now report the cache entry as dead. This might not | 75 // For now report the cache entry as dead. This might not |
| 75 // be the final result if in a subsequent call for this entry, | 76 // be the final result if in a subsequent call for this entry, |
| 76 // the "properties" field has been marked via another path. | 77 // the "properties" field has been marked via another path. |
| 77 return true; | 78 return true; |
| 78 } | 79 } |
| 79 } | 80 } |
| 80 } | 81 } |
| 81 // At this point none of the entries in the matchedProperties vector | 82 // At this point none of the entries in the matchedProperties vector |
| 82 // had a dead "properties" field so trace CachedMatchedProperties strongly. | 83 // had a dead "properties" field so trace CachedMatchedProperties strongly. |
| 83 // FIXME: traceInCollection is also called from WeakProcessing to check if t
he entry is dead. | 84 // FIXME: traceInCollection is also called from WeakProcessing to check if |
| 84 // Avoid calling trace in that case by only calling trace when cachedPropert
ies is not yet marked. | 85 // the entry is dead. Avoid calling trace in that case by only calling |
| 86 // trace when cachedProperties is not yet marked. |
| 85 if (!ThreadHeap::isHeapObjectAlive(cachedProperties)) | 87 if (!ThreadHeap::isHeapObjectAlive(cachedProperties)) |
| 86 visitor->trace(cachedProperties); | 88 visitor->trace(cachedProperties); |
| 87 return false; | 89 return false; |
| 88 } | 90 } |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 class MatchedPropertiesCache { | 93 class MatchedPropertiesCache { |
| 92 DISALLOW_NEW(); | 94 DISALLOW_NEW(); |
| 93 WTF_MAKE_NONCOPYABLE(MatchedPropertiesCache); | 95 WTF_MAKE_NONCOPYABLE(MatchedPropertiesCache); |
| 94 | 96 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 116 Member<CachedMatchedProperties>, | 118 Member<CachedMatchedProperties>, |
| 117 DefaultHash<unsigned>::Hash, | 119 DefaultHash<unsigned>::Hash, |
| 118 HashTraits<unsigned>, | 120 HashTraits<unsigned>, |
| 119 CachedMatchedPropertiesHashTraits>; | 121 CachedMatchedPropertiesHashTraits>; |
| 120 Cache m_cache; | 122 Cache m_cache; |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace blink | 125 } // namespace blink |
| 124 | 126 |
| 125 #endif | 127 #endif |
| OLD | NEW |