Chromium Code Reviews| 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1240 smilEndEventSender().dispatchEventSoon(this); | 1240 smilEndEventSender().dispatchEventSoon(this); |
| 1241 } | 1241 } |
| 1242 | 1242 |
| 1243 m_nextProgressTime = calculateNextProgressTime(elapsed); | 1243 m_nextProgressTime = calculateNextProgressTime(elapsed); |
| 1244 return animationIsContributing; | 1244 return animationIsContributing; |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 void SVGSMILElement::notifyDependentsIntervalChanged() | 1247 void SVGSMILElement::notifyDependentsIntervalChanged() |
| 1248 { | 1248 { |
| 1249 ASSERT(m_intervalBegin.isFinite()); | 1249 ASSERT(m_intervalBegin.isFinite()); |
| 1250 // |loopbreaker| is used to avoid infinite recursions which may be caused fr om: | |
|
haraken
2014/05/30 01:39:45
loopBreaker
| |
| 1251 // |notifyDependentsIntervalChanged| -> |createInstanceTimesFromSyncbase| -> |add{Begin,End}Time| -> |{begin,end}TimeChanged| -> |notifyDependentsIntervalCh anged| | |
| 1252 // |loopbreaker| is defined as a Persistent<HeapHashSet<Member<SVGSMILElemen t> > >. This is safe because it is guaranteed to be empty after the root |notify DependentsIntervalChanged| has exit. | |
|
haraken
2014/05/30 01:39:45
this is safe => this won't cause leaks
has exit =>
| |
| 1250 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMem ber<SVGSMILElement> > >, loopBreaker, (adoptPtrWillBeNoop(new WillBeHeapHashSet< RawPtrWillBeMember<SVGSMILElement> >()))); | 1253 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapHashSet<RawPtrWillBeMem ber<SVGSMILElement> > >, loopBreaker, (adoptPtrWillBeNoop(new WillBeHeapHashSet< RawPtrWillBeMember<SVGSMILElement> >()))); |
| 1251 if (!loopBreaker->add(this).isNewEntry) | 1254 if (!loopBreaker->add(this).isNewEntry) |
| 1252 return; | 1255 return; |
| 1253 | 1256 |
| 1254 TimeDependentSet::iterator end = m_syncBaseDependents.end(); | 1257 TimeDependentSet::iterator end = m_syncBaseDependents.end(); |
| 1255 for (TimeDependentSet::iterator it = m_syncBaseDependents.begin(); it != end ; ++it) { | 1258 for (TimeDependentSet::iterator it = m_syncBaseDependents.begin(); it != end ; ++it) { |
| 1256 SVGSMILElement* dependent = *it; | 1259 SVGSMILElement* dependent = *it; |
| 1257 dependent->createInstanceTimesFromSyncbase(this); | 1260 dependent->createInstanceTimesFromSyncbase(this); |
| 1258 } | 1261 } |
| 1259 | 1262 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1352 void SVGSMILElement::trace(Visitor* visitor) | 1355 void SVGSMILElement::trace(Visitor* visitor) |
| 1353 { | 1356 { |
| 1354 visitor->trace(m_targetElement); | 1357 visitor->trace(m_targetElement); |
| 1355 visitor->trace(m_timeContainer); | 1358 visitor->trace(m_timeContainer); |
| 1356 visitor->trace(m_conditions); | 1359 visitor->trace(m_conditions); |
| 1357 visitor->trace(m_syncBaseDependents); | 1360 visitor->trace(m_syncBaseDependents); |
| 1358 SVGElement::trace(visitor); | 1361 SVGElement::trace(visitor); |
| 1359 } | 1362 } |
| 1360 | 1363 |
| 1361 } | 1364 } |
| OLD | NEW |