mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 916602 (Part 2) - Avoid null timestamp assertion when creating sentinel in FrameAnimator. r=tn
This commit is contained in:
parent
f30fe93cd9
commit
9c54a81f38
@ -58,11 +58,13 @@ FrameAnimator::GetCurrentImgFrameEndTime() const
|
||||
|
||||
if (timeout < 0) {
|
||||
// We need to return a sentinel value in this case, because our logic
|
||||
// doesn't work correctly if we have a negative timeout value. The reason
|
||||
// this positive infinity was chosen was because it works with the loop in
|
||||
// RequestRefresh() below.
|
||||
return TimeStamp() +
|
||||
TimeDuration::FromMilliseconds(static_cast<double>(UINT64_MAX));
|
||||
// doesn't work correctly if we have a negative timeout value. We use
|
||||
// one year in the future as the sentinel because it works with the loop
|
||||
// in RequestRefresh() below.
|
||||
// XXX(seth): It'd be preferable to make our logic work correctly with
|
||||
// negative timeouts.
|
||||
return TimeStamp::NowLoRes() +
|
||||
TimeDuration::FromMilliseconds(31536000.0);
|
||||
}
|
||||
|
||||
TimeDuration durationOfTimeout =
|
||||
|
Loading…
Reference in New Issue
Block a user