mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 943729 - Crash in TimeRanges::TimeRange, r=giles
This commit is contained in:
parent
75eb0073f7
commit
83be9793bf
@ -1320,6 +1320,12 @@ HTMLMediaElement::SetCurrentTime(double aCurrentTime, ErrorResult& aRv)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mPlayed) {
|
||||
LOG(PR_LOG_DEBUG, ("HTMLMediaElement::mPlayed not available."));
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentPlayRangeStart != -1.0) {
|
||||
double rangeEndTime = CurrentTime();
|
||||
LOG(PR_LOG_DEBUG, ("%p Adding \'played\' a range : [%f, %f]", this, mCurrentPlayRangeStart, rangeEndTime));
|
||||
@ -1427,7 +1433,9 @@ HTMLMediaElement::Played()
|
||||
nsRefPtr<TimeRanges> ranges = new TimeRanges();
|
||||
|
||||
uint32_t timeRangeCount = 0;
|
||||
mPlayed->GetLength(&timeRangeCount);
|
||||
if (mPlayed) {
|
||||
mPlayed->GetLength(&timeRangeCount);
|
||||
}
|
||||
for (uint32_t i = 0; i < timeRangeCount; i++) {
|
||||
double begin;
|
||||
double end;
|
||||
|
Loading…
Reference in New Issue
Block a user