Bug 1412231 - Don't crash when running AudioContext operation messages that are not Closed during a force-shutdown. r?karlt
MozReview-Commit-ID: E7RuhQ7pQfW
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -4042,17 +4042,18 @@ MediaStreamGraph::ApplyAudioContextOpera
}
void Run() override
{
mStream->GraphImpl()->ApplyAudioContextOperationImpl(mStream,
mStreams, mAudioContextOperation, mPromise);
}
void RunDuringShutdown() override
{
- MOZ_ASSERT(mAudioContextOperation == AudioContextOperation::Close,
+ MOZ_ASSERT(mAudioContextOperation == AudioContextOperation::Close ||
+ mStream->GraphImpl()->mForceShutDown,
"We should be reviving the graph?");
}
private:
// We don't need strong references here for the same reason ControlMessage
// doesn't.
nsTArray<MediaStream*> mStreams;
AudioContextOperation mAudioContextOperation;