Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: Source/core/css/resolver/MatchedPropertiesCache.cpp

Issue 646013002: Steer clear of g++ scoping bug in range-based for loop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698