diff --git a/accessible/src/base/nsCoreUtils.cpp b/accessible/src/base/nsCoreUtils.cpp index f9b4353c1e2d..90f011803664 100644 --- a/accessible/src/base/nsCoreUtils.cpp +++ b/accessible/src/base/nsCoreUtils.cpp @@ -513,7 +513,7 @@ nsCoreUtils::GetUIntAttr(nsIContent *aContent, nsIAtom *aAttr, PRInt32 *aUInt) nsAutoString value; aContent->GetAttr(kNameSpaceID_None, aAttr, value); if (!value.IsEmpty()) { - PRInt32 error = NS_OK; + nsresult error = NS_OK; PRInt32 integer = value.ToInteger(&error); if (NS_SUCCEEDED(error) && integer > 0) { *aUInt = integer; diff --git a/accessible/src/generic/Accessible.cpp b/accessible/src/generic/Accessible.cpp index b0620b337e04..b38b4789a452 100644 --- a/accessible/src/generic/Accessible.cpp +++ b/accessible/src/generic/Accessible.cpp @@ -3056,7 +3056,7 @@ Accessible::GetAttrValue(nsIAtom *aProperty, double *aValue) if (attrValue.IsEmpty()) return NS_OK; - PRInt32 error = NS_OK; + nsresult error = NS_OK; double value = attrValue.ToDouble(&error); if (NS_SUCCEEDED(error)) *aValue = value; diff --git a/accessible/src/generic/FormControlAccessible.cpp b/accessible/src/generic/FormControlAccessible.cpp index 43a22e22b916..a748cec161b7 100644 --- a/accessible/src/generic/FormControlAccessible.cpp +++ b/accessible/src/generic/FormControlAccessible.cpp @@ -111,7 +111,7 @@ ProgressMeterAccessible::GetMaximumValue(double* aMaximumValue) nsAutoString value; if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::max, value)) { - PRInt32 result = NS_OK; + nsresult result = NS_OK; *aMaximumValue = value.ToDouble(&result); return result; } @@ -159,7 +159,7 @@ ProgressMeterAccessible::GetCurrentValue(double* aCurrentValue) if (attrValue.IsEmpty()) return NS_OK; - PRInt32 error = NS_OK; + nsresult error = NS_OK; double value = attrValue.ToDouble(&error); if (NS_FAILED(error)) return NS_OK; // Zero value because of wrong markup. diff --git a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp index dc639888b4b8..914f2e957762 100644 --- a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp +++ b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp @@ -313,7 +313,7 @@ nsXFormsRangeAccessible::GetMaximumValue(double *aMaximumValue) nsresult rv = sXFormsService->GetRangeEnd(DOMNode, value); NS_ENSURE_SUCCESS(rv, rv); - PRInt32 error = NS_OK; + nsresult error = NS_OK; *aMaximumValue = value.ToDouble(&error); return error; } @@ -328,7 +328,7 @@ nsXFormsRangeAccessible::GetMinimumValue(double *aMinimumValue) nsresult rv = sXFormsService->GetRangeStart(DOMNode, value); NS_ENSURE_SUCCESS(rv, rv); - PRInt32 error = NS_OK; + nsresult error = NS_OK; *aMinimumValue = value.ToDouble(&error); return error; } @@ -343,7 +343,7 @@ nsXFormsRangeAccessible::GetMinimumIncrement(double *aMinimumIncrement) nsresult rv = sXFormsService->GetRangeStep(DOMNode, value); NS_ENSURE_SUCCESS(rv, rv); - PRInt32 error = NS_OK; + nsresult error = NS_OK; *aMinimumIncrement = value.ToDouble(&error); return error; } @@ -358,7 +358,7 @@ nsXFormsRangeAccessible::GetCurrentValue(double *aCurrentValue) nsresult rv = sXFormsService->GetValue(DOMNode, value); NS_ENSURE_SUCCESS(rv, rv); - PRInt32 error = NS_OK; + nsresult error = NS_OK; *aCurrentValue = value.ToDouble(&error); return error; } diff --git a/accessible/src/xul/XULMenuAccessible.cpp b/accessible/src/xul/XULMenuAccessible.cpp index 5adc532d572a..13685ce50ee5 100644 --- a/accessible/src/xul/XULMenuAccessible.cpp +++ b/accessible/src/xul/XULMenuAccessible.cpp @@ -213,7 +213,7 @@ XULMenuitemAccessible::KeyboardShortcut() const if (keyStr.IsEmpty()) { nsAutoString keyCodeStr; keyElm->GetAttr(kNameSpaceID_None, nsGkAtoms::keycode, keyCodeStr); - PRUint32 errorCode; + nsresult errorCode; key = keyStr.ToInteger(&errorCode, kAutoDetect); } else { key = keyStr[0]; diff --git a/accessible/src/xul/XULSliderAccessible.cpp b/accessible/src/xul/XULSliderAccessible.cpp index 8398f3ab7317..defbf002b326 100644 --- a/accessible/src/xul/XULSliderAccessible.cpp +++ b/accessible/src/xul/XULSliderAccessible.cpp @@ -223,7 +223,7 @@ XULSliderAccessible::GetSliderAttr(nsIAtom* aName, double* aValue) if (attrValue.IsEmpty()) return NS_OK; - PRInt32 error = NS_OK; + nsresult error = NS_OK; double value = attrValue.ToDouble(&error); if (NS_SUCCEEDED(error)) *aValue = value; diff --git a/content/base/src/Link.cpp b/content/base/src/Link.cpp index e9d8b4591510..a10a30eda457 100644 --- a/content/base/src/Link.cpp +++ b/content/base/src/Link.cpp @@ -188,7 +188,7 @@ Link::SetHost(const nsAString &aHost) if (iter != end) { nsAutoString portStr(Substring(iter, end)); nsresult rv; - PRInt32 port = portStr.ToInteger((PRInt32 *)&rv); + PRInt32 port = portStr.ToInteger(&rv); if (NS_SUCCEEDED(rv)) { (void)uri->SetPort(port); } @@ -254,7 +254,7 @@ Link::SetPort(const nsAString &aPort) nsresult rv; nsAutoString portStr(aPort); - PRInt32 port = portStr.ToInteger((PRInt32 *)&rv); + PRInt32 port = portStr.ToInteger(&rv); if (NS_FAILED(rv)) { return NS_OK; } diff --git a/content/base/src/nsAttrValue.cpp b/content/base/src/nsAttrValue.cpp index aace0bc7e772..f2a329a1e57f 100644 --- a/content/base/src/nsAttrValue.cpp +++ b/content/base/src/nsAttrValue.cpp @@ -1462,7 +1462,7 @@ bool nsAttrValue::ParseDoubleValue(const nsAString& aString) { ResetIfSet(); - PRInt32 ec; + nsresult ec; double val = PromiseFlatString(aString).ToDouble(&ec); if (NS_FAILED(ec)) { return false; diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 48aceac9d9b2..4e48af843aa8 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -1261,8 +1261,8 @@ nsContentUtils::ParseIntMarginValue(const nsAString& aString, nsIntMargin& resul if (end <= 0) return false; - PRInt32 ec, val = - nsString(Substring(marginStr, start, end)).ToInteger(&ec); + nsresult ec; + PRInt32 val = nsString(Substring(marginStr, start, end)).ToInteger(&ec); if (NS_FAILED(ec)) return false; @@ -5020,11 +5020,10 @@ nsContentUtils::GetViewportInfo(nsIDocument *aDocument) return ret; } - PRInt32 errorCode; - nsAutoString minScaleStr; aDocument->GetHeaderData(nsGkAtoms::minimum_scale, minScaleStr); + nsresult errorCode; float scaleMinFloat = minScaleStr.ToFloat(&errorCode); if (errorCode) { @@ -5039,7 +5038,7 @@ nsContentUtils::GetViewportInfo(nsIDocument *aDocument) // We define a special error code variable for the scale and max scale, // because they are used later (see the width calculations). - PRInt32 scaleMaxErrorCode; + nsresult scaleMaxErrorCode; float scaleMaxFloat = maxScaleStr.ToFloat(&scaleMaxErrorCode); if (scaleMaxErrorCode) { @@ -5052,7 +5051,7 @@ nsContentUtils::GetViewportInfo(nsIDocument *aDocument) nsAutoString scaleStr; aDocument->GetHeaderData(nsGkAtoms::viewport_initial_scale, scaleStr); - PRInt32 scaleErrorCode; + nsresult scaleErrorCode; float scaleFloat = scaleStr.ToFloat(&scaleErrorCode); scaleFloat = NS_MIN(scaleFloat, scaleMaxFloat); scaleFloat = NS_MAX(scaleFloat, scaleMinFloat); diff --git a/content/base/src/nsHTMLContentSerializer.cpp b/content/base/src/nsHTMLContentSerializer.cpp index 6d86d5361e41..07f44b2c53fd 100644 --- a/content/base/src/nsHTMLContentSerializer.cpp +++ b/content/base/src/nsHTMLContentSerializer.cpp @@ -241,7 +241,7 @@ nsHTMLContentSerializer::AppendElementStart(Element* aElement, aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::start, start); if (!start.IsEmpty()){ - PRInt32 rv = 0; + nsresult rv = NS_OK; startAttrVal = start.ToInteger(&rv); //If OL has "start" attribute, first LI element has to start with that value //Therefore subtracting 1 as all the LI elements are incrementing it before using it; diff --git a/content/base/src/nsPlainTextSerializer.cpp b/content/base/src/nsPlainTextSerializer.cpp index 1df76ec14d29..2a84450463c4 100644 --- a/content/base/src/nsPlainTextSerializer.cpp +++ b/content/base/src/nsPlainTextSerializer.cpp @@ -480,7 +480,7 @@ nsPlainTextSerializer::DoOpenContainer(nsIAtom* aTag) : style.Length() - widthOffset); nsAutoString widthstr; style.Mid(widthstr, widthOffset+6, length); - PRInt32 err; + nsresult err; PRInt32 col = widthstr.ToInteger(&err); if (NS_SUCCEEDED(err)) { @@ -563,7 +563,7 @@ nsPlainTextSerializer::DoOpenContainer(nsIAtom* aTag) nsAutoString startAttr; PRInt32 startVal = 1; if (NS_SUCCEEDED(GetAttributeValue(nsGkAtoms::start, startAttr))) { - PRInt32 rv = 0; + nsresult rv = NS_OK; startVal = startAttr.ToInteger(&rv); if (NS_FAILED(rv)) startVal = 1; @@ -581,7 +581,7 @@ nsPlainTextSerializer::DoOpenContainer(nsIAtom* aTag) if (mOLStackIndex > 0) { nsAutoString valueAttr; if (NS_SUCCEEDED(GetAttributeValue(nsGkAtoms::value, valueAttr))) { - PRInt32 rv = 0; + nsresult rv = NS_OK; PRInt32 valueAttrVal = valueAttr.ToInteger(&rv); if (NS_SUCCEEDED(rv)) mOLStack[mOLStackIndex-1] = valueAttrVal; diff --git a/content/base/src/nsXHTMLContentSerializer.cpp b/content/base/src/nsXHTMLContentSerializer.cpp index 2876461da2ed..4a3df2a1bb2d 100644 --- a/content/base/src/nsXHTMLContentSerializer.cpp +++ b/content/base/src/nsXHTMLContentSerializer.cpp @@ -254,7 +254,7 @@ nsXHTMLContentSerializer::SerializeAttributes(nsIContent* aContent, PRInt32 startAttrVal = 0; aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::start, start); if (!start.IsEmpty()) { - PRInt32 rv = 0; + nsresult rv = NS_OK; startAttrVal = start.ToInteger(&rv); //If OL has "start" attribute, first LI element has to start with that value //Therefore subtracting 1 as all the LI elements are incrementing it before using it; @@ -920,7 +920,7 @@ nsXHTMLContentSerializer::SerializeLIValueAttribute(nsIContent* aElement, offset++; else { found = true; - PRInt32 rv = 0; + nsresult rv = NS_OK; startVal = valueStr.ToInteger(&rv); } } diff --git a/content/html/content/src/nsHTMLFormElement.cpp b/content/html/content/src/nsHTMLFormElement.cpp index 76249a100ed6..3e429e928b9c 100644 --- a/content/html/content/src/nsHTMLFormElement.cpp +++ b/content/html/content/src/nsHTMLFormElement.cpp @@ -1794,7 +1794,7 @@ NS_IMETHODIMP nsHTMLFormElement::OnStateChange(nsIWebProgress* aWebProgress, nsIRequest* aRequest, PRUint32 aStateFlags, - PRUint32 aStatus) + nsresult aStatus) { // If STATE_STOP is never fired for any reason (redirect? Failed state // change?) the form element will leak. It will be kept around by the diff --git a/content/html/content/src/nsHTMLFrameSetElement.cpp b/content/html/content/src/nsHTMLFrameSetElement.cpp index 52a2dc73c4aa..203edde4e142 100644 --- a/content/html/content/src/nsHTMLFrameSetElement.cpp +++ b/content/html/content/src/nsHTMLFrameSetElement.cpp @@ -275,7 +275,7 @@ nsHTMLFrameSetElement::ParseRowCol(const nsAString & aValue, } else { // Otherwise just convert to integer. - PRInt32 err; + nsresult err; specs[i].mValue = token.ToInteger(&err); if (err) { specs[i].mValue = 0; diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 04780777712c..5e26f096acc6 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -1005,7 +1005,7 @@ nsHTMLInputElement::GetValueAsDouble() const { double doubleValue; nsAutoString stringValue; - PRInt32 ec; + nsresult ec; GetValueInternal(stringValue); doubleValue = stringValue.ToDouble(&ec); @@ -1107,7 +1107,7 @@ nsHTMLInputElement::GetMinAsDouble() const nsAutoString minStr; GetAttr(kNameSpaceID_None, nsGkAtoms::min, minStr); - PRInt32 ec; + nsresult ec; double min = minStr.ToDouble(&ec); return NS_SUCCEEDED(ec) ? min : MOZ_DOUBLE_NaN(); } @@ -1125,7 +1125,7 @@ nsHTMLInputElement::GetMaxAsDouble() const nsAutoString maxStr; GetAttr(kNameSpaceID_None, nsGkAtoms::max, maxStr); - PRInt32 ec; + nsresult ec; double max = maxStr.ToDouble(&ec); return NS_SUCCEEDED(ec) ? max : MOZ_DOUBLE_NaN(); } @@ -2661,7 +2661,7 @@ nsHTMLInputElement::SanitizeValue(nsAString& aValue) break; case NS_FORM_INPUT_NUMBER: { - PRInt32 ec; + nsresult ec; PromiseFlatString(aValue).ToDouble(&ec); if (NS_FAILED(ec)) { aValue.Truncate(); @@ -3863,7 +3863,7 @@ nsHTMLInputElement::GetStep() const return kStepAny; } - PRInt32 ec; + nsresult ec; // NOTE: should be multiplied by defaultStepScaleFactor, // which is 1 for type=number. step = stepStr.ToDouble(&ec); diff --git a/content/html/content/src/nsMediaFragmentURIParser.cpp b/content/html/content/src/nsMediaFragmentURIParser.cpp index 7a8a762594a4..8b8c11565e3f 100644 --- a/content/html/content/src/nsMediaFragmentURIParser.cpp +++ b/content/html/content/src/nsMediaFragmentURIParser.cpp @@ -106,7 +106,7 @@ bool nsMediaFragmentURIParser::ParseNPTSec(nsDependentSubstring& aString, double } nsDependentSubstring n(aString, 0, index); - PRInt32 ec; + nsresult ec; PRInt32 s = PromiseFlatString(n).ToInteger(&ec); if (NS_FAILED(ec)) { return false; @@ -162,7 +162,7 @@ bool nsMediaFragmentURIParser::ParseNPTFraction(nsDependentSubstring& aString, d if (index > 1) { nsDependentSubstring number(aString, 0, index); - PRInt32 ec; + nsresult ec; fraction = PromiseFlatString(number).ToDouble(&ec); if (NS_FAILED(ec)) { return false; @@ -211,7 +211,7 @@ bool nsMediaFragmentURIParser::ParseNPTHH(nsDependentSubstring& aString, PRUint3 } nsDependentSubstring n(aString, 0, index); - PRInt32 ec; + nsresult ec; PRInt32 u = PromiseFlatString(n).ToInteger(&ec); if (NS_FAILED(ec)) { return false; @@ -235,8 +235,7 @@ bool nsMediaFragmentURIParser::ParseNPTSS(nsDependentSubstring& aString, PRUint3 if (IsDigit(aString[0]) && IsDigit(aString[1])) { nsDependentSubstring n(aString, 0, 2); - PRInt32 ec; - + nsresult ec; PRInt32 u = PromiseFlatString(n).ToInteger(&ec); if (NS_FAILED(ec)) { return false; diff --git a/content/mathml/content/src/nsMathMLElement.cpp b/content/mathml/content/src/nsMathMLElement.cpp index 1cbdc627ac44..73870e5fa153 100644 --- a/content/mathml/content/src/nsMathMLElement.cpp +++ b/content/mathml/content/src/nsMathMLElement.cpp @@ -334,7 +334,7 @@ nsMathMLElement::ParseNumericValue(const nsString& aString, } // Convert number to floating point - PRInt32 errorCode; + nsresult errorCode; float floatValue = number.ToFloat(&errorCode); if (NS_FAILED(errorCode)) return false; @@ -397,7 +397,7 @@ nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes, str.CompressWhitespace(); // MathML numbers can't have leading '+' if (str.Length() > 0 && str.CharAt(0) != '+') { - PRInt32 errorCode; + nsresult errorCode; float floatValue = str.ToFloat(&errorCode); // Negative scriptsizemultipliers are not parsed if (NS_SUCCEEDED(errorCode) && floatValue >= 0.0f) { @@ -443,7 +443,7 @@ nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes, nsAutoString str(value->GetStringValue()); str.CompressWhitespace(); if (str.Length() > 0) { - PRInt32 errorCode; + nsresult errorCode; PRInt32 intValue = str.ToInteger(&errorCode); if (NS_SUCCEEDED(errorCode)) { // This is kind of cheesy ... if the scriptlevel has a sign, diff --git a/content/media/MediaResource.cpp b/content/media/MediaResource.cpp index 83a34d6b4fba..db01f70d8b6e 100644 --- a/content/media/MediaResource.cpp +++ b/content/media/MediaResource.cpp @@ -180,7 +180,7 @@ ChannelMediaResource::OnStartRequest(nsIRequest* aRequest) // 4) X-Content-Duration. // 5) Perform a seek in the decoder to find the value. nsCAutoString durationText; - PRInt32 ec = 0; + nsresult ec = NS_OK; rv = hc->GetResponseHeader(NS_LITERAL_CSTRING("Content-Duration"), durationText); if (NS_FAILED(rv)) { rv = hc->GetResponseHeader(NS_LITERAL_CSTRING("X-AMZ-Meta-Content-Duration"), durationText); diff --git a/content/xul/content/src/nsXULContextMenuBuilder.cpp b/content/xul/content/src/nsXULContextMenuBuilder.cpp index f74d3c4f9b82..76682af6d0d5 100644 --- a/content/xul/content/src/nsXULContextMenuBuilder.cpp +++ b/content/xul/content/src/nsXULContextMenuBuilder.cpp @@ -196,7 +196,7 @@ nsXULContextMenuBuilder::Init(nsIDOMDocumentFragment* aDocumentFragment, NS_IMETHODIMP nsXULContextMenuBuilder::Click(const nsAString& aGeneratedItemId) { - PRInt32 rv; + nsresult rv; PRInt32 idx = nsString(aGeneratedItemId).ToInteger(&rv); if (NS_SUCCEEDED(rv)) { nsCOMPtr element = mElements.SafeObjectAt(idx); diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 2018cd39cca3..88f2dd86a55b 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -4422,7 +4422,7 @@ nsXULDocument::InsertElement(nsIContent* aParent, nsIContent* aChild, if (!posStr.IsEmpty()) { nsresult rv; // Positions are one-indexed. - PRInt32 pos = posStr.ToInteger(reinterpret_cast(&rv)); + PRInt32 pos = posStr.ToInteger(&rv); // Note: if the insertion index (which is |pos - 1|) would be less // than 0 or greater than the number of children aParent has, then // don't insert, since the position is bogus. Just skip on to diff --git a/content/xul/templates/src/nsTemplateRule.cpp b/content/xul/templates/src/nsTemplateRule.cpp index 518260863e8d..0ebf2d2eef8b 100644 --- a/content/xul/templates/src/nsTemplateRule.cpp +++ b/content/xul/templates/src/nsTemplateRule.cpp @@ -155,7 +155,7 @@ nsTemplateCondition::CheckMatchStrings(const nsAString& aLeftString, case eGreater: { // non-numbers always compare false - PRInt32 err; + nsresult err; PRInt32 leftint = PromiseFlatString(aLeftString).ToInteger(&err); if (NS_SUCCEEDED(err)) { PRInt32 rightint = PromiseFlatString(aRightString).ToInteger(&err); diff --git a/content/xul/templates/src/nsXULContentBuilder.cpp b/content/xul/templates/src/nsXULContentBuilder.cpp index d05c3062455f..fed69cf4a0e4 100644 --- a/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/content/xul/templates/src/nsXULContentBuilder.cpp @@ -1889,7 +1889,7 @@ nsXULContentBuilder::InsertSortedNode(nsIContent* aContainer, if (!staticValue.IsEmpty()) { // found "static" XUL element count hint - PRInt32 strErr = 0; + nsresult strErr = NS_OK; staticCount = staticValue.ToInteger(&strErr); if (strErr) staticCount = 0; diff --git a/content/xul/templates/src/nsXULSortService.cpp b/content/xul/templates/src/nsXULSortService.cpp index 8fc5e77b04e8..3f5316fa1ee1 100644 --- a/content/xul/templates/src/nsXULSortService.cpp +++ b/content/xul/templates/src/nsXULSortService.cpp @@ -453,7 +453,7 @@ XULSortServiceImpl::CompareValues(const nsAString& aLeft, PRUint32 aSortHints) { if (aSortHints & SORT_INTEGER) { - PRInt32 err; + nsresult err; PRInt32 leftint = PromiseFlatString(aLeft).ToInteger(&err); if (NS_SUCCEEDED(err)) { PRInt32 rightint = PromiseFlatString(aRight).ToInteger(&err); diff --git a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp index 1be5cd1a9771..dbef239c52e4 100644 --- a/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp +++ b/content/xul/templates/src/nsXULTemplateQueryProcessorRDF.cpp @@ -1321,7 +1321,7 @@ nsXULTemplateQueryProcessorRDF::ParseLiteral(const nsString& aParseType, if (aParseType.EqualsLiteral(PARSE_TYPE_INTEGER)) { nsCOMPtr intLiteral; - PRInt32 errorCode; + nsresult errorCode; PRInt32 intValue = aValue.ToInteger(&errorCode); if (NS_FAILED(errorCode)) return NS_ERROR_FAILURE; diff --git a/docshell/base/nsIContentViewer.idl b/docshell/base/nsIContentViewer.idl index 977f20f12d69..cafe7e854082 100644 --- a/docshell/base/nsIContentViewer.idl +++ b/docshell/base/nsIContentViewer.idl @@ -37,7 +37,7 @@ interface nsIContentViewer : nsISupports attribute nsISupports container; void loadStart(in nsISupports aDoc); - void loadComplete(in unsigned long aStatus); + void loadComplete(in nsresult aStatus); /** * Checks if the document wants to prevent unloading by firing beforeunload on diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 6efd4604883d..63c01c3f13c6 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -10292,7 +10292,7 @@ nsStorage2SH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSString *jsstr = IdToString(cx, id); if (!jsstr) { - return JS_FALSE; + return NS_OK; } JSObject *proto = ::JS_GetPrototype(realObj); diff --git a/dom/base/nsDOMException.cpp b/dom/base/nsDOMException.cpp index 0ee5ee718453..3bcd71110579 100644 --- a/dom/base/nsDOMException.cpp +++ b/dom/base/nsDOMException.cpp @@ -70,7 +70,7 @@ static struct ResultStruct const char* mMessage; } gDOMErrorMsgMap[] = { #include "domerr.msg" - {0, 0, nullptr, nullptr} // sentinel to mark end of array + {NS_OK, 0, nullptr, nullptr} // sentinel to mark end of array }; #undef DOM4_MSG_DEF @@ -205,7 +205,7 @@ nsDOMException::GetMessageMoz(char **aMessage) } NS_IMETHODIMP -nsDOMException::GetResult(PRUint32* aResult) +nsDOMException::GetResult(nsresult* aResult) { NS_ENSURE_ARG_POINTER(aResult); diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index b678bafeae9a..0108e0dcebbe 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -2926,7 +2926,8 @@ nsFocusManager::GetNextTabIndex(nsIContent* aParent, nsAutoString tabIndexStr; child->GetAttr(kNameSpaceID_None, nsGkAtoms::tabindex, tabIndexStr); - PRInt32 ec, val = tabIndexStr.ToInteger(&ec); + nsresult ec; + PRInt32 val = tabIndexStr.ToInteger(&ec); if (NS_SUCCEEDED (ec) && val > aCurrentTabIndex && val != tabIndex) { tabIndex = (tabIndex == 0 || val < tabIndex) ? val : tabIndex; } @@ -2945,7 +2946,8 @@ nsFocusManager::GetNextTabIndex(nsIContent* aParent, nsAutoString tabIndexStr; child->GetAttr(kNameSpaceID_None, nsGkAtoms::tabindex, tabIndexStr); - PRInt32 ec, val = tabIndexStr.ToInteger(&ec); + nsresult ec; + PRInt32 val = tabIndexStr.ToInteger(&ec); if (NS_SUCCEEDED (ec)) { if ((aCurrentTabIndex == 0 && val > tabIndex) || (val < aCurrentTabIndex && val > tabIndex) ) { diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index d59d32c57362..39817112c3aa 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -961,7 +961,7 @@ public: // the one and only TabChild. TabChild* child = GetTabChildFrom(mWindow->GetDocShell()); if (!child) - return false; + return NS_OK; // Retain a reference so the object isn't deleted without IPDL's knowledge. // Corresponding release occurs in DeallocPContentPermissionRequest. @@ -1457,7 +1457,7 @@ nsDOMDeviceStorage::EnumerateInternal(const JS::Value & aName, // the one and only TabChild. TabChild* child = GetTabChildFrom(win->GetDocShell()); if (!child) - return false; + return NS_OK; // Retain a reference so the object isn't deleted without IPDL's knowledge. // Corresponding release occurs in DeallocPContentPermissionRequest. diff --git a/dom/indexedDB/IDBTransaction.cpp b/dom/indexedDB/IDBTransaction.cpp index 235e28aa441d..79e196313c24 100644 --- a/dom/indexedDB/IDBTransaction.cpp +++ b/dom/indexedDB/IDBTransaction.cpp @@ -305,12 +305,12 @@ IDBTransaction::ReleaseSavepoint() nsCOMPtr stmt = GetCachedStatement(NS_LITERAL_CSTRING( "RELEASE SAVEPOINT " SAVEPOINT_NAME )); - NS_ENSURE_TRUE(stmt, false); + NS_ENSURE_TRUE(stmt, NS_OK); mozStorageStatementScoper scoper(stmt); nsresult rv = stmt->Execute(); - NS_ENSURE_SUCCESS(rv, false); + NS_ENSURE_SUCCESS(rv, NS_OK); --mSavepointCount; diff --git a/dom/system/gonk/Volume.cpp b/dom/system/gonk/Volume.cpp index ffa596a07870..20dda8aae68f 100644 --- a/dom/system/gonk/Volume.cpp +++ b/dom/system/gonk/Volume.cpp @@ -155,7 +155,7 @@ Volume::HandleVoldResponse(int aResponseCode, nsCWhitespaceTokenizer &aTokenizer // nsDependentCSubstring mntPoint(aTokenizer.nextToken()); SetMountPoint(mntPoint); - PRInt32 errCode; + nsresult errCode; nsCString state(aTokenizer.nextToken()); SetState((STATE)state.ToInteger(&errCode)); break; @@ -170,7 +170,7 @@ Volume::HandleVoldResponse(int aResponseCode, nsCWhitespaceTokenizer &aTokenizer while (aTokenizer.hasMoreTokens()) { nsCAutoString token(aTokenizer.nextToken()); if (token.Equals("to")) { - PRInt32 errCode; + nsresult errCode; token = aTokenizer.nextToken(); SetState((STATE)token.ToInteger(&errCode)); break; diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index d398f26a599a..874a13d482f8 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -1794,7 +1794,7 @@ WorkerRunnable::Run() JSAutoEnterCompartment ac; if (targetCompartmentObject && !ac.enter(cx, targetCompartmentObject)) { - return false; + return NS_OK; } bool result = WorkerRun(cx, mWorkerPrivate); diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index d15176467827..c4f49cf2de05 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -3285,7 +3285,7 @@ nsEditor::GetNextNode(nsINode* aParentNode, // and want the next one. if (aNoBlockCrossing && IsBlockNode(aParentNode)) { // don't cross out of parent block - return NS_OK; + return nullptr; } return GetNextNode(aParentNode, aEditableNode, aNoBlockCrossing); diff --git a/editor/libeditor/html/nsHTMLAbsPosition.cpp b/editor/libeditor/html/nsHTMLAbsPosition.cpp index 7b59a024d1ae..9d4143186818 100644 --- a/editor/libeditor/html/nsHTMLAbsPosition.cpp +++ b/editor/libeditor/html/nsHTMLAbsPosition.cpp @@ -233,7 +233,7 @@ nsHTMLEditor::GetElementZIndex(nsIDOMElement * aElement, } if (!zIndexStr.EqualsLiteral("auto")) { - PRInt32 errorCode; + nsresult errorCode; *aZindex = zIndexStr.ToInteger(&errorCode); } diff --git a/editor/libeditor/html/nsHTMLCSSUtils.cpp b/editor/libeditor/html/nsHTMLCSSUtils.cpp index b8249c0a440b..c4a6567dfb35 100644 --- a/editor/libeditor/html/nsHTMLCSSUtils.cpp +++ b/editor/libeditor/html/nsHTMLCSSUtils.cpp @@ -1155,7 +1155,7 @@ nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet(nsIDOMNode *aNode, valueString.AssignLiteral("bold"); } else { PRInt32 weight = 0; - PRInt32 errorCode; + nsresult errorCode; nsAutoString value(valueString); weight = value.ToInteger(&errorCode, 10); if (400 < weight) { diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index 7853ffc882f2..6d2cb9e94106 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -1043,7 +1043,7 @@ FindIntegerAfterString(const char *aLeadingString, return false; nsCAutoString numStr(Substring(aCStr, numFront, numBack-numFront)); - PRInt32 errorCode; + nsresult errorCode; foundNumber = numStr.ToInteger(&errorCode); return true; } @@ -2289,12 +2289,13 @@ nsresult nsHTMLEditor::CreateDOMFragmentFromPaste(const nsAString &aInputString, nsAutoString numstr1, numstr2; if (!aInfoStr.IsEmpty()) { - PRInt32 err, sep, num; + PRInt32 sep, num; sep = aInfoStr.FindChar((PRUnichar)','); numstr1 = Substring(aInfoStr, 0, sep); numstr2 = Substring(aInfoStr, sep+1, aInfoStr.Length() - (sep+1)); // Move the start and end children. + nsresult err; num = numstr1.ToInteger(&err); while (num--) { diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp index be96ac7367f4..8d2bf572a7a2 100644 --- a/editor/txtsvc/src/nsTextServicesDocument.cpp +++ b/editor/txtsvc/src/nsTextServicesDocument.cpp @@ -1867,13 +1867,13 @@ nsTextServicesDocument::DidJoinNodes(nsIDOMNode *aLeftNode, // Make sure that both nodes are text nodes -- otherwise we don't care. result = aLeftNode->GetNodeType(&type); - NS_ENSURE_SUCCESS(result, false); + NS_ENSURE_SUCCESS(result, NS_OK); if (nsIDOMNode::TEXT_NODE != type) { return NS_OK; } result = aRightNode->GetNodeType(&type); - NS_ENSURE_SUCCESS(result, false); + NS_ENSURE_SUCCESS(result, NS_OK); if (nsIDOMNode::TEXT_NODE != type) { return NS_OK; } diff --git a/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp b/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp index 8c4f9c6fc7c1..e5b1d9f5f611 100644 --- a/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp +++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.cpp @@ -27,7 +27,7 @@ nsPrintProgress::nsPrintProgress(nsIPrintSettings* aPrintSettings) m_closeProgress = false; m_processCanceled = false; m_pendingStateFlags = -1; - m_pendingStateValue = 0; + m_pendingStateValue = NS_OK; m_PrintSetting = aPrintSettings; } @@ -115,7 +115,7 @@ NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByU if(m_PrintSetting) m_PrintSetting->SetIsCancelled(true); m_processCanceled = aProcessCanceledByUser; - OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, false); + OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, NS_OK); return NS_OK; } @@ -134,7 +134,7 @@ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listene { m_listenerList->AppendElement(listener); if (m_closeProgress || m_processCanceled) - listener->OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, 0); + listener->OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, NS_OK); else { listener->OnStatusChange(nullptr, nullptr, 0, m_pendingStatus.get()); diff --git a/embedding/components/printingui/src/unixshared/nsPrintProgress.h b/embedding/components/printingui/src/unixshared/nsPrintProgress.h index 33c4bf4e232d..f1472f8c1f91 100644 --- a/embedding/components/printingui/src/unixshared/nsPrintProgress.h +++ b/embedding/components/printingui/src/unixshared/nsPrintProgress.h @@ -34,7 +34,7 @@ private: bool m_processCanceled; nsString m_pendingStatus; PRInt32 m_pendingStateFlags; - PRInt32 m_pendingStateValue; + nsresult m_pendingStateValue; nsCOMPtr m_dialog; nsCOMPtr m_listenerList; nsCOMPtr m_observer; diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index ef3b8a863336..1f8bb65cc38d 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -1173,7 +1173,7 @@ nsPermissionManager::Import() if (lineArray[0].EqualsLiteral(kMatchTypeHost) && lineArray.Length() == 4) { - PRInt32 error; + nsresult error; PRUint32 permission = lineArray[2].ToInteger(&error); if (error) continue; diff --git a/gfx/thebes/gfxUserFontSet.h b/gfx/thebes/gfxUserFontSet.h index 40680dadd126..c29d0c5afec8 100644 --- a/gfx/thebes/gfxUserFontSet.h +++ b/gfx/thebes/gfxUserFontSet.h @@ -259,7 +259,7 @@ protected: virtual nsresult LogMessage(gfxProxyFontEntry *aProxy, const char *aMessage, PRUint32 aFlags = nsIScriptError::errorFlag, - nsresult aStatus = 0) = 0; + nsresult aStatus = NS_OK) = 0; const PRUint8* SanitizeOpenTypeData(gfxProxyFontEntry *aProxy, const PRUint8* aData, diff --git a/intl/unicharutil/src/nsEntityConverter.cpp b/intl/unicharutil/src/nsEntityConverter.cpp index beb749c1d5bc..a79734e2ad65 100644 --- a/intl/unicharutil/src/nsEntityConverter.cpp +++ b/intl/unicharutil/src/nsEntityConverter.cpp @@ -43,7 +43,7 @@ nsEntityConverter::LoadVersionPropertyFile() nsresult rv = bundleService->CreateBundle(url.get(), getter_AddRefs(entities)); if (NS_FAILED(rv)) return rv; - PRInt32 result; + nsresult result; nsAutoString key; nsXPIDLString value; diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index f25625191762..b467fd4e84f4 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -42,7 +42,7 @@ using mozilla::dom::DestroyProtoOrIfaceCache; /***************************************************************************/ // stuff used by all -static nsresult ThrowAndFail(unsigned errNum, JSContext* cx, bool* retval) +static nsresult ThrowAndFail(nsresult errNum, JSContext* cx, bool* retval) { XPCThrower::Throw(errNum, cx); *retval = false; diff --git a/js/xpconnect/src/XPCException.cpp b/js/xpconnect/src/XPCException.cpp index 12eb2ddf7dd8..f6a55a44b555 100644 --- a/js/xpconnect/src/XPCException.cpp +++ b/js/xpconnect/src/XPCException.cpp @@ -27,7 +27,7 @@ static struct ResultMap {(val), #val, format}, #include "xpc.msg" #undef XPC_MSG_DEF - {0,0,0} // sentinel to mark end of array + {NS_OK,0,0} // sentinel to mark end of array }; #define RESULT_COUNT ((sizeof(map) / sizeof(map[0]))-1) @@ -100,7 +100,7 @@ NS_IMPL_CI_INTERFACE_GETTER1(nsXPCException, nsIXPCException) nsXPCException::nsXPCException() : mMessage(nullptr), - mResult(0), + mResult(NS_OK), mName(nullptr), mLocation(nullptr), mData(nullptr), diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 473049f88ac8..17cbbf4b3913 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -2228,7 +2228,7 @@ XPCWrappedNative::GetSameCompartmentSecurityWrapper(JSContext *cx) /***************************************************************************/ -static JSBool Throw(unsigned errNum, XPCCallContext& ccx) +static JSBool Throw(nsresult errNum, XPCCallContext& ccx) { XPCThrower::Throw(errNum, ccx); return false; @@ -2676,7 +2676,7 @@ CallMethodHelper::QueryInterfaceFastPath() const } jsval v = JSVAL_NULL; - unsigned err; + nsresult err; JSBool success = XPCConvert::NativeData2JS(mCallContext, &v, &qiresult, nsXPTType::T_INTERFACE_IS, @@ -2842,7 +2842,7 @@ CallMethodHelper::ConvertIndependentParam(uint8_t i) return false; } - unsigned err; + nsresult err; if (!XPCConvert::JSData2Native(mCallContext, &dp->val, src, type, true, ¶m_iid, &err)) { ThrowBadParam(err, i, mCallContext); @@ -2940,7 +2940,7 @@ CallMethodHelper::ConvertDependentParam(uint8_t i) !GetInterfaceTypeFromParam(i, datum_type, ¶m_iid)) return false; - unsigned err; + nsresult err; if (isArray || isSizedString) { if (!GetArraySizeFromParam(i, &array_count)) diff --git a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp index 61f53431fb9f..c6ca977d3033 100644 --- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp +++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp @@ -17,7 +17,7 @@ // All of the exceptions thrown into JS from this file go through here. // That makes this a nice place to set a breakpoint. -static JSBool Throw(unsigned errNum, JSContext* cx) +static JSBool Throw(nsresult errNum, JSContext* cx) { XPCThrower::Throw(errNum, cx); return false; diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 0de9f6299084..fd5725f3b8b6 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -3394,7 +3394,7 @@ public: static JSBool JSStringWithSize2Native(XPCCallContext& ccx, void* d, jsval s, uint32_t count, const nsXPTType& type, - unsigned* pErr); + nsresult* pErr); static nsresult JSValToXPCException(XPCCallContext& ccx, jsval s, diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 023478085810..fc8b7964f873 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1557,7 +1557,7 @@ nsCSSFrameConstructor::CreateGeneratedContent(nsFrameConstructorState& aState, if (-1 != barIndex) { nsAutoString nameSpaceVal; contentString.Left(nameSpaceVal, barIndex); - PRInt32 error; + nsresult error; attrNameSpace = nameSpaceVal.ToInteger(&error, 10); contentString.Cut(0, barIndex + 1); if (contentString.Length()) { diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index e619752ec585..6dede73274e7 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -1572,7 +1572,7 @@ nsListControlFrame::GetFormProperty(nsIAtom* aName, nsAString& aValue) const // Get the selected value of option from local cache (optimization vs. widget) if (nsGkAtoms::selected == aName) { nsAutoString val(aValue); - PRInt32 error = 0; + nsresult error = NS_OK; bool selected = false; PRInt32 indx = val.ToInteger(&error, 10); // Get index from aValue if (error == 0) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 07a5352aff89..1a83ec9de3bf 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -3955,7 +3955,7 @@ nsGfxScrollFrameInner::GetCoordAttribute(nsIBox* aBox, nsIAtom* aAtom, content->GetAttr(kNameSpaceID_None, aAtom, value); if (!value.IsEmpty()) { - PRInt32 error; + nsresult error; // convert it to appunits nscoord result = nsPresContext::CSSPixelsToAppUnits(value.ToInteger(&error)); nscoord halfPixel = nsPresContext::CSSPixelsToAppUnits(0.5f); diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index f1df9805ba90..6748fe4ff75f 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -4140,7 +4140,8 @@ nsTextFrame::GetCursor(const nsPoint& aPoint, nsAutoString tabIndexStr; ancestorContent->GetAttr(kNameSpaceID_None, nsGkAtoms::tabindex, tabIndexStr); if (!tabIndexStr.IsEmpty()) { - PRInt32 rv, tabIndexVal = tabIndexStr.ToInteger(&rv); + nsresult rv; + PRInt32 tabIndexVal = tabIndexStr.ToInteger(&rv); if (NS_SUCCEEDED(rv) && tabIndexVal >= 0) { aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT; break; diff --git a/layout/mathml/nsMathMLOperators.cpp b/layout/mathml/nsMathMLOperators.cpp index 4caecc483333..de6b388d5835 100644 --- a/layout/mathml/nsMathMLOperators.cpp +++ b/layout/mathml/nsMathMLOperators.cpp @@ -114,7 +114,7 @@ SetProperty(OperatorData* aOperatorData, else return; // input is not applicable // aValue is assumed to be a digit from 0 to 7 - PRInt32 error = 0; + nsresult error = NS_OK; float space = aValue.ToFloat(&error) / 18.0; if (error) return; diff --git a/layout/mathml/nsMathMLmactionFrame.cpp b/layout/mathml/nsMathMLmactionFrame.cpp index fe794ce014ed..e73a99c0d887 100644 --- a/layout/mathml/nsMathMLmactionFrame.cpp +++ b/layout/mathml/nsMathMLmactionFrame.cpp @@ -170,7 +170,7 @@ nsMathMLmactionFrame::GetSelectedFrame() GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::selection_, value); if (!value.IsEmpty()) { - PRInt32 errorCode; + nsresult errorCode; selection = value.ToInteger(&errorCode); if (NS_FAILED(errorCode)) selection = 1; diff --git a/layout/mathml/nsMathMLmpaddedFrame.cpp b/layout/mathml/nsMathMLmpaddedFrame.cpp index 6c4083492c2b..41a061195659 100644 --- a/layout/mathml/nsMathMLmpaddedFrame.cpp +++ b/layout/mathml/nsMathMLmpaddedFrame.cpp @@ -182,7 +182,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString, return false; } - PRInt32 errorCode; + nsresult errorCode; float floatValue = number.ToFloat(&errorCode); if (errorCode) { aSign = NS_MATHML_SIGN_INVALID; diff --git a/layout/mathml/nsMathMLmtableFrame.cpp b/layout/mathml/nsMathMLmtableFrame.cpp index 2054e5ea0834..47cf78dff6c0 100644 --- a/layout/mathml/nsMathMLmtableFrame.cpp +++ b/layout/mathml/nsMathMLmtableFrame.cpp @@ -320,7 +320,7 @@ ParseAlignAttribute(nsString& aValue, eAlign& aAlign, PRInt32& aRowIndex) aAlign = eAlign_axis; } if (len) { - PRInt32 error; + nsresult error; aValue.Cut(0, len); // aValue is not a const here aRowIndex = aValue.ToInteger(&error); if (error) @@ -775,7 +775,7 @@ nsMathMLmtdFrame::GetRowSpan() nsAutoString value; mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rowspan, value); if (!value.IsEmpty()) { - PRInt32 error; + nsresult error; rowspan = value.ToInteger(&error); if (error || rowspan < 0) rowspan = 1; @@ -795,7 +795,7 @@ nsMathMLmtdFrame::GetColSpan() nsAutoString value; mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::columnspan_, value); if (!value.IsEmpty()) { - PRInt32 error; + nsresult error; colspan = value.ToInteger(&error); if (error || colspan < 0 || colspan > MAX_COLSPAN) colspan = 1; diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index 000a3d4d72db..f69faafe7860 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -123,7 +123,7 @@ nsPrintData::DoOnProgressChange(PRInt32 aProgress, nsIWebProgressListener* wpl = mPrintProgressListeners.ObjectAt(i); wpl->OnProgressChange(nullptr, nullptr, aProgress, aMaxProgress, aProgress, aMaxProgress); if (aDoStartStop) { - wpl->OnStateChange(nullptr, nullptr, aFlag, 0); + wpl->OnStateChange(nullptr, nullptr, aFlag, NS_OK); } } } diff --git a/layout/style/nsFontFaceLoader.h b/layout/style/nsFontFaceLoader.h index 4bb29bddb8ec..db20b0931be5 100644 --- a/layout/style/nsFontFaceLoader.h +++ b/layout/style/nsFontFaceLoader.h @@ -72,7 +72,7 @@ protected: virtual nsresult LogMessage(gfxProxyFontEntry *aProxy, const char *aMessage, PRUint32 aFlags = nsIScriptError::errorFlag, - nsresult aStatus = 0); + nsresult aStatus = NS_OK); nsresult CheckFontLoad(gfxProxyFontEntry *aFontToLoad, const gfxFontFaceSrc *aFontFaceSrc, diff --git a/layout/svg/base/src/nsSVGImageFrame.cpp b/layout/svg/base/src/nsSVGImageFrame.cpp index cc466d254b35..38850f2a2616 100644 --- a/layout/svg/base/src/nsSVGImageFrame.cpp +++ b/layout/svg/base/src/nsSVGImageFrame.cpp @@ -370,7 +370,7 @@ nsSVGImageFrame::PaintSVG(nsRenderingContext *aContext, static_cast(imgRootFrame->GetContent()); if (!rootSVGElem || !rootSVGElem->IsSVG(nsGkAtoms::svg)) { NS_ABORT_IF_FALSE(false, "missing or non- root node!!"); - return false; + return NS_OK; } // Override preserveAspectRatio in our helper document diff --git a/layout/xul/base/src/nsBox.cpp b/layout/xul/base/src/nsBox.cpp index a14e8528e4ee..b5256cfe8a4a 100644 --- a/layout/xul/base/src/nsBox.cpp +++ b/layout/xul/base/src/nsBox.cpp @@ -470,7 +470,7 @@ nsIFrame::GetOrdinal(nsBoxLayoutState& aState) // When present, attribute value overrides CSS. nsIContent* content = GetContent(); if (content && content->IsXUL()) { - PRInt32 error; + nsresult error; nsAutoString value; content->GetAttr(kNameSpaceID_None, nsGkAtoms::ordinal, value); @@ -651,7 +651,7 @@ nsIBox::AddCSSPrefSize(nsIBox* aBox, nsSize& aSize, bool &aWidthSet, bool &aHeig //