зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
adbdd8367b
Коммит
5069f492d9
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче