Bug 1487811 - P2 Remove CDM8 interface specific IPDL. r=cpearce

Remove members only used by CDM8 from the IPDL and remove code that depended on
the removed IPDL. Rename various instances of 'error' to 'exception' as from
CDM9 'exception' is used exclusively to refer to promise failure states.

Depends on D5628

Differential Revision: https://phabricator.services.mozilla.com/D5629

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bryce Van Dyk 2018-09-13 14:49:27 +00:00
Родитель 413ba3feef
Коммит 0a25798c4e
7 изменённых файлов: 17 добавлений и 70 удалений

Просмотреть файл

@ -43,10 +43,6 @@ public:
virtual void SessionClosed(const nsCString& aSessionId) = 0;
virtual void LegacySessionError(const nsCString& aSessionId,
nsresult aError,
uint32_t aSystemCode,
const nsCString& aMessage) = 0;
virtual void Terminated() = 0;
virtual void Shutdown() = 0;

Просмотреть файл

@ -55,13 +55,13 @@ ChromiumCDMCallbackProxy::ResolvePromise(uint32_t aPromiseId)
void
ChromiumCDMCallbackProxy::RejectPromise(uint32_t aPromiseId,
nsresult aError,
nsresult aException,
const nsCString& aErrorMessage)
{
DispatchToMainThread("ChromiumCDMProxy::RejectPromise",
&ChromiumCDMProxy::RejectPromise,
aPromiseId,
aError,
aException,
aErrorMessage);
}
@ -169,20 +169,6 @@ ChromiumCDMCallbackProxy::SessionClosed(const nsCString& aSessionId)
NS_ConvertUTF8toUTF16(aSessionId));
}
void
ChromiumCDMCallbackProxy::LegacySessionError(const nsCString& aSessionId,
nsresult aError,
uint32_t aSystemCode,
const nsCString& aMessage)
{
DispatchToMainThread("ChromiumCDMProxy::OnSessionError",
&ChromiumCDMProxy::OnSessionError ,
NS_ConvertUTF8toUTF16(aSessionId),
aError,
aSystemCode,
NS_ConvertUTF8toUTF16(aMessage));
}
void
ChromiumCDMCallbackProxy::Terminated()
{

Просмотреть файл

@ -33,7 +33,7 @@ public:
void ResolvePromise(uint32_t aPromiseId) override;
void RejectPromise(uint32_t aPromiseId,
nsresult aError,
nsresult aException,
const nsCString& aErrorMessage) override;
void SessionMessage(const nsACString& aSessionId,
@ -48,10 +48,6 @@ public:
void SessionClosed(const nsCString& aSessionId) override;
void LegacySessionError(const nsCString& aSessionId,
nsresult aError,
uint32_t aSystemCode,
const nsCString& aMessage) override;
void Terminated() override;
void Shutdown() override;

Просмотреть файл

@ -406,7 +406,7 @@ ChromiumCDMParent::RecvOnResolvePromise(const uint32_t& aPromiseId)
void
ChromiumCDMParent::RejectPromise(uint32_t aPromiseId,
nsresult aError,
nsresult aException,
const nsCString& aErrorMessage)
{
GMP_LOG(
@ -417,7 +417,7 @@ ChromiumCDMParent::RejectPromise(uint32_t aPromiseId,
return;
}
mCDMCallback->RejectPromise(aPromiseId, aError, aErrorMessage);
mCDMCallback->RejectPromise(aPromiseId, aException, aErrorMessage);
}
static nsresult
@ -439,11 +439,11 @@ ToNsresult(uint32_t aException)
ipc::IPCResult
ChromiumCDMParent::RecvOnRejectPromise(const uint32_t& aPromiseId,
const uint32_t& aError,
const uint32_t& aException,
const uint32_t& aSystemCode,
const nsCString& aErrorMessage)
{
RejectPromise(aPromiseId, ToNsresult(aError), aErrorMessage);
RejectPromise(aPromiseId, ToNsresult(aException), aErrorMessage);
return IPC_OK();
}
@ -504,26 +504,10 @@ ChromiumCDMParent::RecvOnSessionClosed(const nsCString& aSessionId)
return IPC_OK();
}
ipc::IPCResult
ChromiumCDMParent::RecvOnLegacySessionError(const nsCString& aSessionId,
const uint32_t& aError,
const uint32_t& aSystemCode,
const nsCString& aMessage)
{
GMP_LOG("ChromiumCDMParent::RecvOnLegacySessionError(this=%p)", this);
if (!mCDMCallback || mIsShutdown) {
return IPC_OK();
}
mCDMCallback->LegacySessionError(
aSessionId, ToNsresult(aError), aSystemCode, aMessage);
return IPC_OK();
}
DecryptStatus
ToDecryptStatus(uint32_t aError)
ToDecryptStatus(uint32_t aStatus)
{
switch (static_cast<cdm::Status>(aError)) {
switch (static_cast<cdm::Status>(aStatus)) {
case cdm::kSuccess:
return DecryptStatus::Ok;
case cdm::kNoKey:

Просмотреть файл

@ -118,10 +118,6 @@ protected:
const nsCString& aSessionId,
const double& aSecondsSinceEpoch) override;
ipc::IPCResult RecvOnSessionClosed(const nsCString& aSessionId) override;
ipc::IPCResult RecvOnLegacySessionError(const nsCString& aSessionId,
const uint32_t& aError,
const uint32_t& aSystemCode,
const nsCString& aMessage) override;
ipc::IPCResult RecvDecrypted(const uint32_t& aId,
const uint32_t& aStatus,
ipc::Shmem&& aData) override;

Просмотреть файл

@ -14,10 +14,13 @@ async protocol PChromiumCDM
manager PGMPContent;
child:
// cdm::ContentDecryptionModule8
// cdm::ContentDecryptionModule9
async Init(bool aAllowDistinctiveIdentifier,
bool aAllowPersistentState);
async GetStatusForPolicy(uint32_t aPromiseId,
nsCString aMinHdcpVersion);
async SetServerCertificate(uint32_t aPromiseId,
uint8_t[] aServerCert);
@ -57,10 +60,7 @@ child:
async GiveBuffer(Shmem aShmem);
async PurgeShmems();
// cdm::ContentDecryptionModule9
async GetStatusForPolicy(uint32_t aPromiseId,
nsCString aMinHdcpVersion);
parent:
async __delete__();
@ -68,13 +68,12 @@ parent:
// cdm::Host9
async OnResolvePromiseWithKeyStatus(uint32_t aPromiseId, uint32_t aKeyStatus);
// cdm::Host8
async OnResolveNewSessionPromise(uint32_t aPromiseId, nsCString aSessionId);
async OnResolvePromise(uint32_t aPromiseId);
async OnRejectPromise(uint32_t aPromiseId,
uint32_t aError,
uint32_t aException,
uint32_t aSystemCode,
nsCString aErrorMessage);
@ -90,20 +89,15 @@ parent:
async OnSessionClosed(nsCString aSessionId);
async OnLegacySessionError(nsCString aSessionId,
uint32_t aError,
uint32_t aSystemCode,
nsCString aMessage);
async ResolveLoadSessionPromise(uint32_t aPromiseId, bool aSuccessful);
// Return values of cdm::ContentDecryptionModule8::Decrypt
// Return values of cdm::ContentDecryptionModule9::Decrypt
async Decrypted(uint32_t aId, uint32_t aStatus, Shmem aDecryptedData);
async DecryptFailed(uint32_t aId, uint32_t aStatus);
async OnDecoderInitDone(uint32_t aStatus);
// Return values of cdm::ContentDecryptionModule8::DecryptAndDecodeFrame
// Return values of cdm::ContentDecryptionModule9::DecryptAndDecodeFrame
async DecodedShmem(CDMVideoFrame aFrame, Shmem aData);
async DecodedData(CDMVideoFrame aFrame, uint8_t[] aData);
async DecodeFailed(uint32_t aStatus);

Просмотреть файл

@ -1090,11 +1090,6 @@ private:
void SessionClosed(const nsCString& aSessionId) override { }
void LegacySessionError(const nsCString& aSessionId,
nsresult aError,
uint32_t aSystemCode,
const nsCString& aMessage) override { }
void Terminated() override { mRunner->Terminated(); }
void Shutdown() override { mRunner->Shutdown(); }