зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384578 - Adjust the calling sequence to avoid app crash by race condition. r=jolin
MozReview-Commit-ID: JKtfNYTTCjp --HG-- extra : rebase_source : 526f6dd42de7170fd7baf49817e6c721245314fb
This commit is contained in:
Родитель
c4b5078d48
Коммит
7236b09a4d
|
@ -253,14 +253,14 @@ HLSDemuxer::~HLSDemuxer()
|
|||
{
|
||||
HLS_DEBUG("HLSDemuxer", "~HLSDemuxer()");
|
||||
mCallbackSupport->Detach();
|
||||
if (mJavaCallbacks) {
|
||||
HLSDemuxerCallbacksSupport::DisposeNative(mJavaCallbacks);
|
||||
mJavaCallbacks = nullptr;
|
||||
}
|
||||
if (mHLSDemuxerWrapper) {
|
||||
mHLSDemuxerWrapper->Destroy();
|
||||
mHLSDemuxerWrapper = nullptr;
|
||||
}
|
||||
if (mJavaCallbacks) {
|
||||
HLSDemuxerCallbacksSupport::DisposeNative(mJavaCallbacks);
|
||||
mJavaCallbacks = nullptr;
|
||||
}
|
||||
mInitPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,14 +100,14 @@ HLSResource::~HLSResource()
|
|||
mCallbackSupport->Detach();
|
||||
mCallbackSupport = nullptr;
|
||||
}
|
||||
if (mJavaCallbacks) {
|
||||
HLSResourceCallbacksSupport::DisposeNative(mJavaCallbacks);
|
||||
mJavaCallbacks = nullptr;
|
||||
}
|
||||
if (mHLSResourceWrapper) {
|
||||
mHLSResourceWrapper->Destroy();
|
||||
mHLSResourceWrapper = nullptr;
|
||||
}
|
||||
if (mJavaCallbacks) {
|
||||
HLSResourceCallbacksSupport::DisposeNative(mJavaCallbacks);
|
||||
mJavaCallbacks = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
Загрузка…
Ссылка в новой задаче