Bug 1121198 part 3: Make nsFrameLoader::UpdateBaseWindowPositionAndSize infallible, since it only returns NS_OK. r=bz

This commit is contained in:
Daniel Holbert 2015-01-14 11:04:00 -08:00
parent b6ccf14be4
commit b6dff99084
2 changed files with 5 additions and 6 deletions

View File

@ -1963,10 +1963,11 @@ nsFrameLoader::UpdatePositionAndSize(nsSubDocumentFrame *aIFrame)
}
return NS_OK;
}
return UpdateBaseWindowPositionAndSize(aIFrame);
UpdateBaseWindowPositionAndSize(aIFrame);
return NS_OK;
}
nsresult
void
nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame)
{
nsCOMPtr<nsIDocShell> docShell;
@ -1984,15 +1985,13 @@ nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame)
if (!weakFrame.IsAlive()) {
// GetPosition() killed us
return NS_OK;
return;
}
nsIntSize size = aIFrame->GetSubdocumentSize();
baseWindow->SetPositionAndSize(x, y, size.width, size.height, false);
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -287,7 +287,7 @@ private:
// Updates the subdocument position and size. This gets called only
// when we have our own in-process DocShell.
nsresult UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame);
void UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame);
nsresult CheckURILoad(nsIURI* aURI);
void FireErrorEvent();
nsresult ReallyStartLoadingInternal();