Bug 1345036 - label shutdown event dispatching. r?jwwang
MozReview-Commit-ID: HfiocBzddNS
--- a/dom/media/android/AndroidMediaResourceServer.cpp
+++ b/dom/media/android/AndroidMediaResourceServer.cpp
@@ -319,17 +319,17 @@ ServeResourceEvent::Shutdown()
{
// Cleanup resources and exit.
mInput->Close();
mOutput->Close();
// To shutdown the current thread we need to first exit this event.
// The Shutdown event below is posted to the main thread to do this.
nsCOMPtr<nsIRunnable> event = new ShutdownThreadEvent(NS_GetCurrentThread());
- NS_DispatchToMainThread(event);
+ SystemGroup::Dispatch("ServeResourceEvent::Shutdown", TaskCategory::Other, event.forget());
}
/*
This is the listener attached to the server socket. When an HTTP
request is made by the client the OnSocketAccepted method is
called. This method will spawn a thread to process the request.
The thread receives a single event which does the parsing of
the HTTP request and forwarding the data from the MediaResource