Bug 1388668 - Replace NS_DispatchToCurrentThread call with AbstractThread dispatch. r?padenot
We should be dispatching this event to a tab group so that it can be
associated with it.
MozReview-Commit-ID: FcEQD7cN2Xj
--- a/dom/media/webaudio/AudioDestinationNode.cpp
+++ b/dom/media/webaudio/AudioDestinationNode.cpp
@@ -408,20 +408,21 @@ AudioDestinationNode::DestroyMediaStream
MediaStreamGraph::DestroyNonRealtimeInstance(graph);
}
AudioNode::DestroyMediaStream();
}
void
AudioDestinationNode::NotifyMainThreadStreamFinished()
{
+ MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mStream->IsFinished());
if (mIsOffline) {
- NS_DispatchToCurrentThread(
+ AbstractMainThread()->Dispatch(
NewRunnableMethod("dom::AudioDestinationNode::FireOfflineCompletionEvent",
this,
&AudioDestinationNode::FireOfflineCompletionEvent));
}
}
void
AudioDestinationNode::FireOfflineCompletionEvent()