зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415401 - Part4 - Have GMPServiceParent::RecvLaunchGMP fill in the error description. r=cpearce
MozReview-Commit-ID: GQoV7g1uQeC --HG-- extra : rebase_source : 21bae673ebb3284fd298e69a8c701bc79b9f4e63
This commit is contained in:
Родитель
9774850bfe
Коммит
28fae71ddc
|
@ -1740,6 +1740,7 @@ GMPServiceParent::RecvLaunchGMP(const nsCString& aNodeId,
|
|||
{
|
||||
if (mService->IsShuttingDown()) {
|
||||
*aOutRv = NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||
*aOutErrorDescription = NS_LITERAL_CSTRING("Service is shutting down.");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
@ -1748,12 +1749,14 @@ GMPServiceParent::RecvLaunchGMP(const nsCString& aNodeId,
|
|||
*aOutPluginId = gmp->GetPluginId();
|
||||
} else {
|
||||
*aOutRv = NS_ERROR_FAILURE;
|
||||
*aOutErrorDescription = NS_LITERAL_CSTRING("SelectPluginForAPI returns nullptr.");
|
||||
*aOutPluginId = 0;
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
if (!gmp->EnsureProcessLoaded(aOutProcessId)) {
|
||||
*aOutRv = NS_ERROR_FAILURE;
|
||||
*aOutErrorDescription = NS_LITERAL_CSTRING("Process has not loaded.");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
@ -1766,9 +1769,12 @@ GMPServiceParent::RecvLaunchGMP(const nsCString& aNodeId,
|
|||
|
||||
Endpoint<PGMPContentParent> parent;
|
||||
Endpoint<PGMPContentChild> child;
|
||||
if (NS_WARN_IF(NS_FAILED(PGMPContent::CreateEndpoints(
|
||||
OtherPid(), *aOutProcessId, &parent, &child)))) {
|
||||
*aOutRv = NS_ERROR_FAILURE;
|
||||
nsresult rv =
|
||||
PGMPContent::CreateEndpoints(OtherPid(), *aOutProcessId, &parent, &child);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
*aOutRv = rv;
|
||||
*aOutErrorDescription =
|
||||
NS_LITERAL_CSTRING("PGMPContent::CreateEndpoints failed.");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
@ -1776,6 +1782,8 @@ GMPServiceParent::RecvLaunchGMP(const nsCString& aNodeId,
|
|||
|
||||
if (!gmp->SendInitGMPContentChild(Move(child))) {
|
||||
*aOutRv = NS_ERROR_FAILURE;
|
||||
*aOutErrorDescription =
|
||||
NS_LITERAL_CSTRING("SendInitGMPContentChild failed.");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
@ -1803,6 +1811,7 @@ GMPServiceParent::RecvLaunchGMPForNodeId(
|
|||
aNodeId.mOrigin(), aNodeId.mTopLevelOrigin(), aNodeId.mGMPName(), nodeId);
|
||||
if (!NS_SUCCEEDED(rv)) {
|
||||
*aOutRv = rv;
|
||||
*aOutErrorDescription = NS_LITERAL_CSTRING("GetNodeId failed.");
|
||||
return IPC_OK();
|
||||
}
|
||||
return RecvLaunchGMP(nodeId,
|
||||
|
|
Загрузка…
Ссылка в новой задаче