зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1236380 - GMPStorage::mShutdown=true until Init() succeeds - r=cpearce
Initialize GMPStorage::mShutdown to true, so that if Init() has not completed yet or if it failed, other methods will not try and access a null mStorage.
This commit is contained in:
Родитель
99e46fd0e0
Коммит
74d744c943
|
@ -568,7 +568,7 @@ GMPStorageParent::GMPStorageParent(const nsCString& aNodeId,
|
||||||
GMPParent* aPlugin)
|
GMPParent* aPlugin)
|
||||||
: mNodeId(aNodeId)
|
: mNodeId(aNodeId)
|
||||||
, mPlugin(aPlugin)
|
, mPlugin(aPlugin)
|
||||||
, mShutdown(false)
|
, mShutdown(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,6 +602,7 @@ GMPStorageParent::Init()
|
||||||
mStorage = MakeUnique<GMPMemoryStorage>();
|
mStorage = MakeUnique<GMPMemoryStorage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mShutdown = false;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ private:
|
||||||
|
|
||||||
const nsCString mNodeId;
|
const nsCString mNodeId;
|
||||||
RefPtr<GMPParent> mPlugin;
|
RefPtr<GMPParent> mPlugin;
|
||||||
|
// True after Shutdown(), or if Init() has not completed successfully.
|
||||||
bool mShutdown;
|
bool mShutdown;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче