diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 3c597b09620..b6d5bfd2efa 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -120,9 +120,10 @@ nsIsIndexFrame::Paint(nsIPresContext* aPresContext, NS_IMETHODIMP nsIsIndexFrame::UpdatePromptLabel() { - nsresult result; if (!mTextContent) return NS_ERROR_UNEXPECTED; + nsresult result = NS_OK; + // Get the text from the "prompt" attribute. // If it is zero length, set it to a default value (localized) nsAutoString prompt; @@ -370,11 +371,12 @@ nsIsIndexFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext) { - nsresult result; if (!mContent || !mInputContent) { return NS_ERROR_UNEXPECTED; } + nsresult result = NS_OK; + // Begin ProcessAsURLEncoded nsAutoString data; diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp index 3c597b09620..b6d5bfd2efa 100644 --- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp +++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp @@ -120,9 +120,10 @@ nsIsIndexFrame::Paint(nsIPresContext* aPresContext, NS_IMETHODIMP nsIsIndexFrame::UpdatePromptLabel() { - nsresult result; if (!mTextContent) return NS_ERROR_UNEXPECTED; + nsresult result = NS_OK; + // Get the text from the "prompt" attribute. // If it is zero length, set it to a default value (localized) nsAutoString prompt; @@ -370,11 +371,12 @@ nsIsIndexFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext) { - nsresult result; if (!mContent || !mInputContent) { return NS_ERROR_UNEXPECTED; } + nsresult result = NS_OK; + // Begin ProcessAsURLEncoded nsAutoString data;