Closed Bug 1186299 Opened 4 years ago Closed 4 years ago
Sink::Prepare To Shutdown and Audio Sink::Shutdown into one function
Since AudioSink::Shutdown is a sync function, it looks like we can move the code of AudioSink::PrepareToShutdown into AudioSink::Shutdown. Is there any reason for the 2-step shutdown for AudioSink?
The only reason is that it used to be that the caller needed to hold the decoder monitor for AudioSink::PrepareToShutdown and drop it for Shutdown because of potential reentrancy issues caused by nsIThread::Shutdown spinning the event loop inside AudioSink::Shutdown.
This should do the work. AudioSink::Shutdown would exit the monitor internally when necessary. AudioSink's API is also made more consistent for these functions are either thread-safe or requiring decoder monitor.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Attachment #8637108 - Flags: review?(kinetik)
Attachment #8637108 - Flags: review?(kinetik) → review+
Thanks for the review!
You need to log in before you can comment on or make changes to this bug.