b=1069671 don't dispatch "update" after "abort" r=kinetik

--HG--
extra : rebase_source : 20f644edb8eb99791b29303adce90d3659582821
This commit is contained in:
Karl Tomlinson 2014-09-23 15:47:30 +12:00
parent 39403ad7cb
commit c99f33e630
2 changed files with 9 additions and 5 deletions

View File

@ -289,7 +289,15 @@ void
SourceBuffer::StopUpdating()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mUpdating);
if (!mUpdating) {
// The buffer append algorithm has been interrupted by abort().
//
// If the sequence appendBuffer(), abort(), appendBuffer() occurs before
// the first StopUpdating() runnable runs, then a second StopUpdating()
// runnable will be scheduled, but still only one (the first) will queue
// events.
return;
}
mUpdating = false;
QueueAsyncSimpleEvent("update");
QueueAsyncSimpleEvent("updateend");

View File

@ -1,9 +1,5 @@
[SourceBuffer-abort-updating.html]
type: testharness
expected: ERROR
[SourceBuffer#abort() (video/webm; codecs="vorbis,vp8") : Check the algorithm when the updating attribute is true.]
expected: FAIL
[SourceBuffer#abort() (video/mp4) : Check the algorithm when the updating attribute is true.]
expected: FAIL