mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1243878 - Null check CDMProxy::mKeys in CDMProxy::OnExpirationChange() before use. r=jwwang
All the methods in CDMProxy except CDMProxy::OnExpirationChange() that use mKeys null check mKeys before using it because it can go away during shutdown before the IPC message to call the methods have had a chance to run. We should do the null check in CDMProxy::OnExpirationChange() too.
This commit is contained in:
parent
23a07b65e7
commit
01cfbce7e9
@ -580,6 +580,9 @@ CDMProxy::OnExpirationChange(const nsAString& aSessionId,
|
||||
GMPTimestamp aExpiryTime)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (mKeys.IsNull()) {
|
||||
return;
|
||||
}
|
||||
RefPtr<dom::MediaKeySession> session(mKeys->GetSession(aSessionId));
|
||||
if (session) {
|
||||
session->SetExpiration(static_cast<double>(aExpiryTime));
|
||||
|
Loading…
Reference in New Issue
Block a user