Bug 59675, fixing uninitialized variables. r=jst, a=waterson.
git-svn-id: svn://10.0.0.236/trunk@82928 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1cab05269a
commit
a02e205742
@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
|
||||
NS_IMETHODIMP
|
||||
DocumentViewerImpl::LoadComplete(nsresult aStatus)
|
||||
{
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||
|
||||
mDocument->SetRootContent(mDocElement);
|
||||
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
if (mXSLTransformMediator) {
|
||||
rv = SetupTransformMediator();
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
|
||||
NS_IMETHODIMP
|
||||
DocumentViewerImpl::LoadComplete(nsresult aStatus)
|
||||
{
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
|
||||
|
||||
@ -647,7 +647,7 @@ DocumentViewerImpl::Init(nsIWidget* aParentWidget,
|
||||
NS_IMETHODIMP
|
||||
DocumentViewerImpl::LoadComplete(nsresult aStatus)
|
||||
{
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> global;
|
||||
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -952,26 +952,23 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
|
||||
Area* area = (Area*) mAreas.ElementAt(i);
|
||||
if (area->IsInside(aX, aY)) {
|
||||
if (area->GetHasURL()) {
|
||||
nsresult rv;
|
||||
// Set the image loader's source URL and base URL
|
||||
nsIURI* baseUri = nsnull;
|
||||
nsIHTMLContent* htmlContent;
|
||||
if (mMap) {
|
||||
rv = mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIHTMLContent* htmlContent;
|
||||
if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) {
|
||||
htmlContent->GetBaseURL(baseUri);
|
||||
NS_RELEASE(htmlContent);
|
||||
}
|
||||
else {
|
||||
nsIDocument* doc;
|
||||
rv = mMap->GetDocument(doc);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) {
|
||||
doc->GetBaseURL(baseUri); // Could just use mDocument here...
|
||||
NS_RELEASE(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (NS_FAILED(rv) || !baseUri) return PR_FALSE;
|
||||
if (!baseUri) return PR_FALSE;
|
||||
|
||||
nsAutoString href;
|
||||
area->GetHREF(href);
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -1515,8 +1515,8 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
|
||||
if (gNoisy) {
|
||||
gNoiseIndent++;
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 ctc;
|
||||
PRTime start = LL_ZERO; // Initialize these variablies to silence the compiler.
|
||||
PRInt32 ctc = 0; // We only use these if they are set (gLameReflowMetrics).
|
||||
if (gLameReflowMetrics) {
|
||||
start = PR_Now();
|
||||
ctc = nsLineBox::GetCtorCount();
|
||||
@ -6371,8 +6371,8 @@ nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,
|
||||
depth = GetDepth();
|
||||
}
|
||||
}
|
||||
PRTime start;
|
||||
PRInt32 drawnLines;
|
||||
PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.
|
||||
PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).
|
||||
if (gLamePaintMetrics) {
|
||||
start = PR_Now();
|
||||
drawnLines = 0;
|
||||
|
||||
@ -952,26 +952,23 @@ nsImageMap::IsInside(nscoord aX, nscoord aY,
|
||||
Area* area = (Area*) mAreas.ElementAt(i);
|
||||
if (area->IsInside(aX, aY)) {
|
||||
if (area->GetHasURL()) {
|
||||
nsresult rv;
|
||||
// Set the image loader's source URL and base URL
|
||||
nsIURI* baseUri = nsnull;
|
||||
nsIHTMLContent* htmlContent;
|
||||
if (mMap) {
|
||||
rv = mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsIHTMLContent* htmlContent;
|
||||
if (NS_SUCCEEDED( mMap->QueryInterface(kIHTMLContentIID, (void**)&htmlContent) )) {
|
||||
htmlContent->GetBaseURL(baseUri);
|
||||
NS_RELEASE(htmlContent);
|
||||
}
|
||||
else {
|
||||
nsIDocument* doc;
|
||||
rv = mMap->GetDocument(doc);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (NS_SUCCEEDED( mMap->GetDocument(doc) ) && doc) {
|
||||
doc->GetBaseURL(baseUri); // Could just use mDocument here...
|
||||
NS_RELEASE(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (NS_FAILED(rv) || !baseUri) return PR_FALSE;
|
||||
if (!baseUri) return PR_FALSE;
|
||||
|
||||
nsAutoString href;
|
||||
area->GetHREF(href);
|
||||
|
||||
@ -275,7 +275,7 @@ nsXMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
|
||||
|
||||
mDocument->SetRootContent(mDocElement);
|
||||
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
if (mXSLTransformMediator) {
|
||||
rv = SetupTransformMediator();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user