mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777292 - Add casts and annoyed comments where we make up nsresult codes on the fly; r=ehsan
This commit is contained in:
parent
7644f69a87
commit
417223dce7
@ -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,9 +71,10 @@ 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,
|
||||
(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
|
||||
|
Loading…
Reference in New Issue
Block a user