зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1427934. P3 - check v.ended before calling callSeekToNextFrame(). r=kaku
v.ended is set to true before the 'ended' event is fired. Then we can simplify the code by asserting seekToNextFrame() should never be rejected. MozReview-Commit-ID: 5fB2QuboU0I --HG-- extra : rebase_source : f9d423919e3fe6e34eaff1b4603398e66eaa594e
This commit is contained in:
Родитель
a9eabe67be
Коммит
22c8322d40
|
@ -36,16 +36,12 @@ function startTest(test, token) {
|
|||
ok(false, v.token + ": Should have already received seeking event.");
|
||||
}
|
||||
v.seenSeeking = false;
|
||||
if (!v.seenEnded)
|
||||
if (!v.ended) {
|
||||
callSeekToNextFrame();
|
||||
}
|
||||
},
|
||||
() => {
|
||||
// When seek reaches the end, the promise is resolved before 'ended'
|
||||
// is fired. The resolver calls callSeekToNextFrame() to schedule
|
||||
// another seek and then the 'ended' handler calls finish() to shut
|
||||
// down the MediaDecoder which will reject the seek promise. So we don't
|
||||
// raise an error in this case.
|
||||
ok(v.finished, "seekToNextFrame() failed.");
|
||||
ok(false, v.token + ": seekToNextFrame() failed.");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче