| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #if ENABLE(OILPAN) | 38 #if ENABLE(OILPAN) |
| 39 bool CachedMatchedPropertiesHashTraits::traceInCollection(Visitor* visitor, Memb
er<CachedMatchedProperties>& cachedProperties, WTF::ShouldWeakPointersBeMarkedSt
rongly strongify) | 39 bool CachedMatchedPropertiesHashTraits::traceInCollection(Visitor* visitor, Memb
er<CachedMatchedProperties>& cachedProperties, WTF::ShouldWeakPointersBeMarkedSt
rongly strongify) |
| 40 { | 40 { |
| 41 // Only honor the cache's weakness semantics if the collection is traced | 41 // Only honor the cache's weakness semantics if the collection is traced |
| 42 // with WeakPointersActWeak. Otherwise just trace the cachedProperties | 42 // with WeakPointersActWeak. Otherwise just trace the cachedProperties |
| 43 // strongly, ie. call trace on it. | 43 // strongly, ie. call trace on it. |
| 44 if (cachedProperties && strongify == WTF::WeakPointersActWeak) { | 44 if (cachedProperties && strongify == WTF::WeakPointersActWeak) { |
| 45 // A given cache entry is only kept alive if none of the MatchedProperti
es | 45 // A given cache entry is only kept alive if none of the MatchedProperti
es |
| 46 // in the CachedMatchedProperties value contain a dead "properties" fiel
d. | 46 // in the CachedMatchedProperties value contain a dead "properties" fiel
d. |
| 47 // If there is a dead field the entire cache entry is removed. | 47 // If there is a dead field the entire cache entry is removed. |
| 48 for (const auto& cachedProperties : cachedProperties->matchedProperties)
{ | 48 for (const auto& matchedProperties : cachedProperties->matchedProperties
) { |
| 49 if (!visitor->isAlive(cachedProperties.properties)) { | 49 if (!visitor->isAlive(matchedProperties.properties)) { |
| 50 // For now report the cache entry as dead. This might not | 50 // For now report the cache entry as dead. This might not |
| 51 // be the final result if in a subsequent call for this entry, | 51 // be the final result if in a subsequent call for this entry, |
| 52 // the "properties" field has been marked via another path. | 52 // the "properties" field has been marked via another path. |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 // At this point none of the entries in the matchedProperties vector | 57 // At this point none of the entries in the matchedProperties vector |
| 58 // had a dead "properties" field so trace CachedMatchedProperties strongly. | 58 // had a dead "properties" field so trace CachedMatchedProperties strongly. |
| 59 visitor->trace(cachedProperties); | 59 visitor->trace(cachedProperties); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 void MatchedPropertiesCache::trace(Visitor* visitor) | 194 void MatchedPropertiesCache::trace(Visitor* visitor) |
| 195 { | 195 { |
| 196 #if ENABLE(OILPAN) | 196 #if ENABLE(OILPAN) |
| 197 visitor->trace(m_cache); | 197 visitor->trace(m_cache); |
| 198 #endif | 198 #endif |
| 199 } | 199 } |
| 200 | 200 |
| 201 } | 201 } |
| OLD | NEW |