Bug 1540748 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

As the crash happened in [1], the possible root cause is that we have improper `endTime`, which is super large positive value, and the `startTime` is negative (it's possible). As we've ensured that `endTime` is always larger than `startTime`, so a positive value substract a negative value is the only possible situation to cause a overflow.

In order to eliminate the problem a improper end time causes, we could use `frame / playbackRate` to get the correct duration. 

[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/dom/media/MediaQueue.h#120
As the crash happened in [1], the possible root cause is that we have improper `endTime`, which is super large positive value, and the `startTime` is negative (it's possible). As we've ensured that `endTime` is always larger than `startTime`, so a positive value substract a negative value is the only possible situation to cause a overflow.

In order to eliminate the problem a improper end time causes, maybe we could use `frame / playbackRate` to get the correct duration. 

[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/dom/media/MediaQueue.h#120
As the crash happened in [1], the possible root cause is that we have improper `endTime`, which is super large positive value, and the `startTime` is negative (it's possible). As we've ensured that `endTime` is always larger than `startTime`, so a positive value substract a negative value is the only possible situation to cause a overflow.

[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/dom/media/MediaQueue.h#120
As the crash happened in [1], the possible root cause is that we have improper `endTime`, which is super large positive value, and the `startTime` is negative (it's possible). As we've ensured that `endTime` is always larger than `startTime`, so a positive value substracting a negative value is the only possible situation to cause a overflow.

[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/dom/media/MediaQueue.h#120

Back to Bug 1540748 Comment 8