bug #15605. Reviewed by nisheeth. Check the return code from GoToAnchor(...) :-)

This commit is contained in:
rpotts@netscape.com
1999-10-06 05:15:13 +00:00
parent 0da3980289
commit 9bc5d9db84
2 changed files with 28 additions and 18 deletions

View File

@@ -2017,17 +2017,22 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
if (nsnull != (const char *) ref) {
// Go to the anchor in the current document
rv = presShell->GoToAnchor(nsAutoString(ref));
if (NS_SUCCEEDED(rv)) {
// Pass notifications to BrowserAppCore just to be consistent with
// regular page loads thro' necko
nsCOMPtr<nsIChannel> dummyChannel;
rv = NS_OpenURI(getter_AddRefs(dummyChannel), aUri, nsnull);
if (NS_FAILED(rv)) return rv;
// Pass notifications to BrowserAppCore just to be consistent with
// regular page loads thro' necko
nsCOMPtr<nsIChannel> dummyChannel;
rv = NS_OpenURI(getter_AddRefs(dummyChannel), aUri, nsnull);
if (NS_FAILED(rv)) return rv;
mProcessedEndDocumentLoad = PR_FALSE;
rv = OnEndDocumentLoad(mDocLoader, dummyChannel, 0, this);
mProcessedEndDocumentLoad = PR_FALSE;
rv = OnEndDocumentLoad(mDocLoader, dummyChannel, 0, this);
return rv;
return rv;
}
//
// If the anchor does not exist, just fall down into the code
// to load a new document...
//
}
else if (aType == LOAD_HISTORY)
{