mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158307 - Add Shutdown checks r=cpearce
This commit is contained in:
parent
0b01a9eedb
commit
cb2fec0936
@ -61,6 +61,11 @@ MediaOmxCommonDecoder::FirstFrameLoaded(nsAutoPtr<MediaInfo> aInfo,
|
||||
MediaDecoderEventVisibility aEventVisibility)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mShuttingDown) {
|
||||
return;
|
||||
}
|
||||
|
||||
MediaDecoder::FirstFrameLoaded(aInfo, aEventVisibility);
|
||||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
@ -98,6 +103,11 @@ MediaOmxCommonDecoder::PauseStateMachine()
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
GetReentrantMonitor().AssertCurrentThreadIn();
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
|
||||
if (mShuttingDown) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetStateMachine()) {
|
||||
return;
|
||||
}
|
||||
@ -118,6 +128,10 @@ MediaOmxCommonDecoder::ResumeStateMachine()
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s current time %f", __PRETTY_FUNCTION__,
|
||||
mCurrentTime));
|
||||
|
||||
if (mShuttingDown) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetStateMachine()) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user