Bug 1113474 - Release MediaKeys when cleaning up pending promises - r=jwwang

This commit is contained in:
Edwin Flores 2015-02-11 15:11:54 +13:00
parent 1cc7f0e61c
commit ba23326c70

View File

@ -82,6 +82,7 @@ CloseSessions(const nsAString& aKey,
void* aClosure)
{
aSession->OnClosed();
((MediaKeys*)aClosure)->Release();
return PL_DHASH_NEXT;
}
@ -111,7 +112,9 @@ MediaKeys::Shutdown()
mProxy = nullptr;
}
mPromises.Enumerate(&RejectPromises, nullptr);
nsRefPtr<MediaKeys> kungFuDeathGrip = this;
mPromises.Enumerate(&RejectPromises, this);
mPromises.Clear();
}