OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1215 | 1215 |
1216 m_nextProgressTime = calculateNextProgressTime(elapsed); | 1216 m_nextProgressTime = calculateNextProgressTime(elapsed); |
1217 return animationIsContributing; | 1217 return animationIsContributing; |
1218 } | 1218 } |
1219 | 1219 |
1220 void SVGSMILElement::notifyDependentsIntervalChanged() | 1220 void SVGSMILElement::notifyDependentsIntervalChanged() |
1221 { | 1221 { |
1222 ASSERT(m_interval.begin.isFinite()); | 1222 ASSERT(m_interval.begin.isFinite()); |
1223 // |loopBreaker| is used to avoid infinite recursions which may be caused fr om: | 1223 // |loopBreaker| is used to avoid infinite recursions which may be caused fr om: |
1224 // |notifyDependentsIntervalChanged| -> |createInstanceTimesFromSyncbase| -> |add{Begin,End}Time| -> |{begin,end}TimeChanged| -> |notifyDependentsIntervalCh anged| | 1224 // |notifyDependentsIntervalChanged| -> |createInstanceTimesFromSyncbase| -> |add{Begin,End}Time| -> |{begin,end}TimeChanged| -> |notifyDependentsIntervalCh anged| |
1225 // |loopBreaker| is defined as a Persistent<HeapHashSet<Member<SVGSMILElemen t>>>. This won't cause leaks because it is guaranteed to be empty after the root |notifyDependentsIntervalChanged| has exited. | 1225 DEFINE_STATIC_LOCAL(HashSet<UntracedMember<SVGSMILElement>>, loopBreaker, () ); |
haraken
2016/05/11 11:53:23
Maybe worth adding a comment why the untraced memb
sof
2016/05/11 12:11:20
yes, done.
| |
1226 DEFINE_STATIC_LOCAL(HeapHashSet<Member<SVGSMILElement>>, loopBreaker, (new H eapHashSet<Member<SVGSMILElement>>)); | |
1227 if (!loopBreaker.add(this).isNewEntry) | 1226 if (!loopBreaker.add(this).isNewEntry) |
1228 return; | 1227 return; |
1229 | 1228 |
1230 for (SVGSMILElement* element : m_syncBaseDependents) | 1229 for (SVGSMILElement* element : m_syncBaseDependents) |
1231 element->createInstanceTimesFromSyncbase(this); | 1230 element->createInstanceTimesFromSyncbase(this); |
1232 | 1231 |
1233 loopBreaker.remove(this); | 1232 loopBreaker.remove(this); |
1234 } | 1233 } |
1235 | 1234 |
1236 void SVGSMILElement::createInstanceTimesFromSyncbase(SVGSMILElement* syncBase) | 1235 void SVGSMILElement::createInstanceTimesFromSyncbase(SVGSMILElement* syncBase) |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1356 { | 1355 { |
1357 visitor->trace(m_targetElement); | 1356 visitor->trace(m_targetElement); |
1358 visitor->trace(m_timeContainer); | 1357 visitor->trace(m_timeContainer); |
1359 visitor->trace(m_conditions); | 1358 visitor->trace(m_conditions); |
1360 visitor->trace(m_syncBaseDependents); | 1359 visitor->trace(m_syncBaseDependents); |
1361 SVGElement::trace(visitor); | 1360 SVGElement::trace(visitor); |
1362 SVGTests::trace(visitor); | 1361 SVGTests::trace(visitor); |
1363 } | 1362 } |
1364 | 1363 |
1365 } // namespace blink | 1364 } // namespace blink |
OLD | NEW |