зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1049501: Don't let the GMPThread event loop recurse while handling IPDL shutdowns r=bsmedberg
This commit is contained in:
Родитель
5d8df0d985
Коммит
15385e72c4
|
@ -72,7 +72,9 @@ GMPVideoEncoderParent::GMPVideoEncoderParent(GMPParent *aPlugin)
|
|||
|
||||
GMPVideoEncoderParent::~GMPVideoEncoderParent()
|
||||
{
|
||||
mEncodedThread->Shutdown();
|
||||
if (mEncodedThread) {
|
||||
mEncodedThread->Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
GMPVideoHostImpl&
|
||||
|
@ -249,6 +251,12 @@ GMPVideoEncoderParent::ActorDestroy(ActorDestroyReason aWhy)
|
|||
mCallback->Terminated();
|
||||
mCallback = nullptr;
|
||||
}
|
||||
// Must be shut down before VideoEncoderDestroyed(), since this can recurse
|
||||
// the GMPThread event loop. See bug 1049501
|
||||
if (mEncodedThread) {
|
||||
mEncodedThread->Shutdown();
|
||||
mEncodedThread = nullptr;
|
||||
}
|
||||
if (mPlugin) {
|
||||
// Ignore any return code. It is OK for this to fail without killing the process.
|
||||
mPlugin->VideoEncoderDestroyed(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче