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.

This commit is contained in:
smfr%smfr.org 2005-06-28 03:43:09 +00:00
Родитель adbdd8367b
Коммит 5069f492d9
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -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;
BOOL requestOK = YES;
if (aRequest) // aRequest can be null (e.g. for relative anchors)
{
nsresult requestStatus = NS_OK;
aRequest->GetStatus(&requestStatus);
BOOL requestOK = NS_SUCCEEDED(requestStatus);
requestOK = NS_SUCCEEDED(requestStatus);
}
nsCAutoString spec;
aLocation->GetSpec(spec);