Bug 782252 - Convert declared types to nsresult; r=ehsan

This commit is contained in:
Aryeh Gregor 2012-08-06 15:02:31 +03:00
parent c200656eac
commit ff57e540e2
9 changed files with 15 additions and 15 deletions

View File

@ -1310,7 +1310,7 @@ nsAttrValue::ParseSpecialIntValue(const nsAString& aString)
{
ResetIfSet();
PRInt32 ec;
nsresult ec;
bool strict;
bool isPercent = false;
nsAutoString tmp(aString);
@ -1343,7 +1343,7 @@ nsAttrValue::ParseIntWithBounds(const nsAString& aString,
ResetIfSet();
PRInt32 ec;
nsresult ec;
bool strict;
PRInt32 originalVal = StringToInteger(aString, &strict, &ec);
if (NS_FAILED(ec)) {
@ -1363,7 +1363,7 @@ nsAttrValue::ParseNonNegativeIntValue(const nsAString& aString)
{
ResetIfSet();
PRInt32 ec;
nsresult ec;
bool strict;
PRInt32 originalVal = StringToInteger(aString, &strict, &ec);
if (NS_FAILED(ec) || originalVal < 0) {
@ -1380,7 +1380,7 @@ nsAttrValue::ParsePositiveIntValue(const nsAString& aString)
{
ResetIfSet();
PRInt32 ec;
nsresult ec;
bool strict;
PRInt32 originalVal = StringToInteger(aString, &strict, &ec);
if (NS_FAILED(ec) || originalVal <= 0) {
@ -1661,7 +1661,7 @@ nsAttrValue::GetStringBuffer(const nsAString& aValue) const
PRInt32
nsAttrValue::StringToInteger(const nsAString& aValue, bool* aStrict,
PRInt32* aErrorCode,
nsresult* aErrorCode,
bool aCanBePercent,
bool* aIsPercent) const
{

View File

@ -418,7 +418,7 @@ private:
// aValue.
PRInt32 StringToInteger(const nsAString& aValue,
bool* aStrict,
PRInt32* aErrorCode,
nsresult* aErrorCode,
bool aCanBePercent = false,
bool* aIsPercent = nullptr) const;
// Given an enum table and a particular entry in that table, return

View File

@ -887,8 +887,8 @@ NS_IMETHODIMP nsWebBrowser::GetCurrentState(PRUint32 *aCurrentState)
return NS_OK;
}
/* readonly attribute unsigned long result; */
NS_IMETHODIMP nsWebBrowser::GetResult(PRUint32 *aResult)
/* readonly attribute nsresult result; */
NS_IMETHODIMP nsWebBrowser::GetResult(nsresult *aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
if (mPersist)

View File

@ -149,7 +149,7 @@ protected:
// persistence object
nsCOMPtr<nsIWebBrowserPersist> mPersist;
PRUint32 mPersistCurrentState;
PRUint32 mPersistResult;
nsresult mPersistResult;
PRUint32 mPersistFlags;
// stream

View File

@ -98,7 +98,7 @@ interface nsIWebBrowserPersist : nsICancelable
* @return NS_BINDING_ABORTED Operation cancelled.
* @return NS_ERROR_FAILURE Non-specific failure.
*/
readonly attribute unsigned long result;
readonly attribute nsresult result;
/**
* Callback listener for progress notifications. The object that the

View File

@ -303,7 +303,7 @@ NS_IMETHODIMP nsWebBrowserPersist::GetCurrentState(PRUint32 *aCurrentState)
}
/* readonly attribute unsigned long result; */
NS_IMETHODIMP nsWebBrowserPersist::GetResult(PRUint32 *aResult)
NS_IMETHODIMP nsWebBrowserPersist::GetResult(nsresult *aResult)
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mPersistResult;

View File

@ -203,7 +203,7 @@ private:
bool mReplaceExisting;
bool mSerializingOutput;
PRUint32 mPersistFlags;
PRUint32 mPersistResult;
nsresult mPersistResult;
PRInt64 mTotalCurrentProgress;
PRInt64 mTotalMaxProgress;
PRInt16 mWrapColumn;

View File

@ -26,5 +26,5 @@ interface nsIWifiListener : nsISupports
* error values will be nsresult codes.
*/
void onError(in long error);
void onError(in nsresult error);
};

View File

@ -423,7 +423,7 @@ XRE_InitChildProcess(int aArgc,
NS_LogInit();
int rv = XRE_InitCommandLine(aArgc, aArgv);
nsresult rv = XRE_InitCommandLine(aArgc, aArgv);
if (NS_FAILED(rv)) {
NS_LogTerm();
return NS_ERROR_FAILURE;
@ -547,7 +547,7 @@ XRE_InitParentProcess(int aArgc,
gArgc = aArgc;
gArgv = aArgv;
int rv = XRE_InitCommandLine(gArgc, gArgv);
nsresult rv = XRE_InitCommandLine(gArgc, gArgv);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;