Fix bug 298291: url bar not updated after navigating to relative anchor. Remove over-zealous null check on the nsIRequest, which is null in this case.

git-svn-id: svn://10.0.0.236/trunk@175196 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
smfr%smfr.org
2005-06-28 03:43:09 +00:00
parent 0cbe6dbb49
commit 627fd08ea5

View File

@@ -600,7 +600,7 @@ NS_IMETHODIMP
CHBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
nsIURI *aLocation)
{
if (!aLocation || !aWebProgress || !aRequest)
if (!aLocation || !aWebProgress)
return NS_ERROR_FAILURE;
// only pay attention to location change for our nsIDOMWindow
@@ -610,9 +610,13 @@ CHBrowserListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aR
if (windowForProgress != ourWindow)
return NS_OK;
nsresult requestStatus = NS_OK;
aRequest->GetStatus(&requestStatus);
BOOL requestOK = NS_SUCCEEDED(requestStatus);
BOOL requestOK = YES;
if (aRequest) // aRequest can be null (e.g. for relative anchors)
{
nsresult requestStatus = NS_OK;
aRequest->GetStatus(&requestStatus);
requestOK = NS_SUCCEEDED(requestStatus);
}
nsCAutoString spec;
aLocation->GetSpec(spec);