зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154513 - [EME] GMP crash crashes browser in Nightly - Remember if actor is destroyed, so that no messages are sent from subsequent Shutdown() - r=cpearce
This commit is contained in:
Родитель
3b9c04bb47
Коммит
5dd903a2e0
|
@ -32,6 +32,7 @@ namespace gmp {
|
|||
GMPAudioDecoderParent::GMPAudioDecoderParent(GMPContentParent* aPlugin)
|
||||
: mIsOpen(false)
|
||||
, mShuttingDown(false)
|
||||
, mActorDestroyed(false)
|
||||
, mPlugin(aPlugin)
|
||||
, mCallback(nullptr)
|
||||
{
|
||||
|
@ -174,7 +175,9 @@ GMPAudioDecoderParent::Shutdown()
|
|||
}
|
||||
|
||||
mIsOpen = false;
|
||||
unused << SendDecodingComplete();
|
||||
if (!mActorDestroyed) {
|
||||
unused << SendDecodingComplete();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -184,6 +187,7 @@ void
|
|||
GMPAudioDecoderParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
mIsOpen = false;
|
||||
mActorDestroyed = true;
|
||||
if (mCallback) {
|
||||
// May call Close() (and Shutdown()) immediately or with a delay
|
||||
mCallback->Terminated();
|
||||
|
|
|
@ -55,6 +55,7 @@ private:
|
|||
|
||||
bool mIsOpen;
|
||||
bool mShuttingDown;
|
||||
bool mActorDestroyed;
|
||||
nsRefPtr<GMPContentParent> mPlugin;
|
||||
GMPAudioDecoderCallbackProxy* mCallback;
|
||||
};
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace gmp {
|
|||
GMPDecryptorParent::GMPDecryptorParent(GMPContentParent* aPlugin)
|
||||
: mIsOpen(false)
|
||||
, mShuttingDown(false)
|
||||
, mActorDestroyed(false)
|
||||
, mPlugin(aPlugin)
|
||||
, mCallback(nullptr)
|
||||
#ifdef DEBUG
|
||||
|
@ -347,7 +348,9 @@ GMPDecryptorParent::Shutdown()
|
|||
}
|
||||
|
||||
mIsOpen = false;
|
||||
unused << SendDecryptingComplete();
|
||||
if (!mActorDestroyed) {
|
||||
unused << SendDecryptingComplete();
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Keep this sync'd up with Shutdown
|
||||
|
@ -355,6 +358,7 @@ void
|
|||
GMPDecryptorParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
mIsOpen = false;
|
||||
mActorDestroyed = true;
|
||||
if (mCallback) {
|
||||
// May call Close() (and Shutdown()) immediately or with a delay
|
||||
mCallback->Terminated();
|
||||
|
|
|
@ -111,6 +111,7 @@ private:
|
|||
|
||||
bool mIsOpen;
|
||||
bool mShuttingDown;
|
||||
bool mActorDestroyed;
|
||||
nsRefPtr<GMPContentParent> mPlugin;
|
||||
nsCString mPluginId;
|
||||
GMPDecryptorProxyCallback* mCallback;
|
||||
|
|
|
@ -47,6 +47,7 @@ GMPVideoDecoderParent::GMPVideoDecoderParent(GMPContentParent* aPlugin)
|
|||
: GMPSharedMemManager(aPlugin)
|
||||
, mIsOpen(false)
|
||||
, mShuttingDown(false)
|
||||
, mActorDestroyed(false)
|
||||
, mPlugin(aPlugin)
|
||||
, mCallback(nullptr)
|
||||
, mVideoHost(this)
|
||||
|
@ -213,7 +214,9 @@ GMPVideoDecoderParent::Shutdown()
|
|||
}
|
||||
|
||||
mIsOpen = false;
|
||||
unused << SendDecodingComplete();
|
||||
if (!mActorDestroyed) {
|
||||
unused << SendDecodingComplete();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -223,6 +226,7 @@ void
|
|||
GMPVideoDecoderParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
mIsOpen = false;
|
||||
mActorDestroyed = true;
|
||||
mVideoHost.DoneWithAPI();
|
||||
|
||||
if (mCallback) {
|
||||
|
|
|
@ -81,6 +81,7 @@ private:
|
|||
|
||||
bool mIsOpen;
|
||||
bool mShuttingDown;
|
||||
bool mActorDestroyed;
|
||||
nsRefPtr<GMPContentParent> mPlugin;
|
||||
GMPVideoDecoderCallbackProxy* mCallback;
|
||||
GMPVideoHostImpl mVideoHost;
|
||||
|
|
|
@ -54,6 +54,7 @@ GMPVideoEncoderParent::GMPVideoEncoderParent(GMPContentParent *aPlugin)
|
|||
: GMPSharedMemManager(aPlugin),
|
||||
mIsOpen(false),
|
||||
mShuttingDown(false),
|
||||
mActorDestroyed(false),
|
||||
mPlugin(aPlugin),
|
||||
mCallback(nullptr),
|
||||
mVideoHost(this)
|
||||
|
@ -235,7 +236,9 @@ GMPVideoEncoderParent::Shutdown()
|
|||
mVideoHost.DoneWithAPI();
|
||||
|
||||
mIsOpen = false;
|
||||
unused << SendEncodingComplete();
|
||||
if (!mActorDestroyed) {
|
||||
unused << SendEncodingComplete();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -250,6 +253,7 @@ GMPVideoEncoderParent::ActorDestroy(ActorDestroyReason aWhy)
|
|||
{
|
||||
LOGD(("%s::%s: %p (%d)", __CLASS__, __FUNCTION__, this, (int) aWhy));
|
||||
mIsOpen = false;
|
||||
mActorDestroyed = true;
|
||||
if (mCallback) {
|
||||
// May call Close() (and Shutdown()) immediately or with a delay
|
||||
mCallback->Terminated();
|
||||
|
|
|
@ -77,6 +77,7 @@ private:
|
|||
|
||||
bool mIsOpen;
|
||||
bool mShuttingDown;
|
||||
bool mActorDestroyed;
|
||||
nsRefPtr<GMPContentParent> mPlugin;
|
||||
GMPVideoEncoderCallbackProxy* mCallback;
|
||||
GMPVideoHostImpl mVideoHost;
|
||||
|
|
Загрузка…
Ссылка в новой задаче