mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 720103 - Pass timed element not interval to notify new interval callback; r=dholbert
This commit is contained in:
parent
be421c5a23
commit
7f2b82582b
@ -2199,7 +2199,7 @@ nsSMILTimedElement::NotifyNewInterval()
|
||||
container->SyncPauseTime();
|
||||
}
|
||||
|
||||
NotifyTimeDependentsParams params = { mCurrentInterval, container };
|
||||
NotifyTimeDependentsParams params = { this, container };
|
||||
mTimeDependents.EnumerateEntries(NotifyNewIntervalCallback, ¶ms);
|
||||
}
|
||||
|
||||
@ -2309,9 +2309,14 @@ nsSMILTimedElement::NotifyNewIntervalCallback(TimeValueSpecPtrKey* aKey,
|
||||
NotifyTimeDependentsParams* params =
|
||||
static_cast<NotifyTimeDependentsParams*>(aData);
|
||||
NS_ABORT_IF_FALSE(params, "null data ptr while enumerating hashtable");
|
||||
NS_ABORT_IF_FALSE(params->mCurrentInterval, "null current-interval ptr");
|
||||
nsSMILInterval* interval = params->mTimedElement->mCurrentInterval;
|
||||
// It's possible that in notifying one new time dependent of a new interval
|
||||
// that a chain reaction is triggered which results in the original interval
|
||||
// disappearing. If that's the case we can skip sending further notifications.
|
||||
if (!interval)
|
||||
return PL_DHASH_STOP;
|
||||
|
||||
nsSMILTimeValueSpec* spec = aKey->GetKey();
|
||||
spec->HandleNewInterval(*params->mCurrentInterval, params->mTimeContainer);
|
||||
spec->HandleNewInterval(*interval, params->mTimeContainer);
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ protected:
|
||||
};
|
||||
|
||||
struct NotifyTimeDependentsParams {
|
||||
nsSMILInterval* mCurrentInterval;
|
||||
nsSMILTimedElement* mTimedElement;
|
||||
nsSMILTimeContainer* mTimeContainer;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user