Bug 1039884 - Let ControlMessages added by runnables in stable state be run during shutdown. r=roc r=karlt

This commit is contained in:
Andreas Pehrson 2015-01-08 06:21:00 +01:00
parent 215c9480ef
commit 759638e212

View File

@ -1713,9 +1713,6 @@ MediaStreamGraphImpl::RunInStableState(bool aSourceIsMSG)
mPostedRunInStableState = false;
}
for (uint32_t i = 0; i < runnables.Length(); ++i) {
runnables[i]->Run();
}
for (uint32_t i = 0; i < controlMessagesToRunDuringShutdown.Length(); ++i) {
controlMessagesToRunDuringShutdown[i]->RunDuringShutdown();
}
@ -1724,6 +1721,10 @@ MediaStreamGraphImpl::RunInStableState(bool aSourceIsMSG)
mCanRunMessagesSynchronously = mDetectedNotRunning &&
mLifecycleState >= LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN;
#endif
for (uint32_t i = 0; i < runnables.Length(); ++i) {
runnables[i]->Run();
}
}