зеркало из https://github.com/mozilla/gecko-dev.git
Bug 777292 - Add casts and annoyed comments where we make up nsresult codes on the fly; r=ehsan
This commit is contained in:
Родитель
be9a414c79
Коммит
88e2b537b5
|
@ -130,7 +130,9 @@ IsNSSErrorCode(PRErrorCode code)
|
|||
static nsresult
|
||||
GetXPCOMFromNSSError(PRErrorCode code)
|
||||
{
|
||||
return NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, -1 * code);
|
||||
// XXX Don't make up nsresults, it's supposed to be an enum (bug 778113)
|
||||
return (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY,
|
||||
-1 * code);
|
||||
}
|
||||
|
||||
static nsresult
|
||||
|
|
|
@ -71,10 +71,11 @@ NSSErrorsService::GetXPCOMFromNSSError(PRInt32 aNSPRCode, nsresult *aXPCOMErrorC
|
|||
|
||||
// The error codes within each module may be a 16 bit value.
|
||||
// For simplicity let's use the positive value of the NSS code.
|
||||
// XXX Don't make up nsresults, it's supposed to be an enum (bug 778113)
|
||||
|
||||
*aXPCOMErrorCode =
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY,
|
||||
-1 * aNSPRCode);
|
||||
(nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY,
|
||||
-1 * aNSPRCode);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,9 @@ PRErrorCode_to_nsresult(PRErrorCode error)
|
|||
}
|
||||
|
||||
// From NSSErrorsService::GetXPCOMFromNSSError
|
||||
return NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, -1 * error);
|
||||
// XXX Don't make up nsresults, it's supposed to be an enum (bug 778113)
|
||||
return (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY,
|
||||
-1 * error);
|
||||
}
|
||||
|
||||
// IMPORTANT: This must be called immediately after the function returning the
|
||||
|
|
Загрузка…
Ссылка в новой задаче