b=914016 always dispatch main thread updates after non-realtime graph finishes r=padenot

--HG--
extra : transplant_source : %0B%0C%93%05k%3F%3A%AEfT9%C9u%8D%C5pa%9F%11%0D
This commit is contained in:
Karl Tomlinson 2013-10-24 07:21:33 +13:00
Родитель 29f8ad0439
Коммит e4e70cf83e
3 изменённых файлов: 22 добавлений и 3 удалений

Просмотреть файл

@ -960,9 +960,9 @@ MediaStreamGraphImpl::PrepareUpdatesToMainThreadState(bool aFinalUpdate)
{
mMonitor.AssertCurrentThreadOwns();
// We don't want to update the main thread about timing update when we are not
// running in realtime.
if (ShouldUpdateMainThread()) {
// We don't want to frequently update the main thread about timing update
// when we are not running in realtime.
if (aFinalUpdate || ShouldUpdateMainThread()) {
mStreamUpdates.SetCapacity(mStreamUpdates.Length() + mStreams.Length());
for (uint32_t i = 0; i < mStreams.Length(); ++i) {
MediaStream* stream = mStreams[i];

Просмотреть файл

@ -59,6 +59,7 @@ load 910171-1.html
load 920987.html
load 925619-1.html
load 925619-2.html
load offline-buffer-source-ended-1.html
skip-if(B2G) load oscillator-ended-1.html # intermittent B2G timeouts, bug 920338
skip-if(B2G) load oscillator-ended-2.html # intermittent B2G timeouts, bug 920338
test-pref(media.mediasource.enabled,true) load 926665.html

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html class="reftest-wait">
<script>
// Currently this test fails unless an extra block is processed after the
// BufferSource finishes. 12033 ≡ 1 (mod 128), but the test should pass even
// when only 12001 samples are processed.
var context = new window.OfflineAudioContext(1, 12033, 12000);
var source = context.createBufferSource();
source.buffer = context.createBuffer(1, 12000, context.sampleRate);
source.onended = function(e) {
document.documentElement.removeAttribute("class");
}
source.connect(context.destination);
source.start(0);
context.startRendering();
</script>