Bug 22294. Use aURI's spec (rather than mURL) to cough up a URL for global history. r=mscott

git-svn-id: svn://10.0.0.236/trunk@57315 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
2000-01-11 01:11:31 +00:00
parent ca31e66d94
commit 3068fe3dd9
2 changed files with 16 additions and 2 deletions

View File

@@ -1517,7 +1517,14 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
NS_WITH_SERVICE(nsIGlobalHistory, history, "component://netscape/browser/global-history", &rv);
if (NS_FAILED(rv)) break;
rv = history->AddPage(nsCAutoString(mURL), nsnull /* referrer */, PR_Now());
nsXPIDLCString spec;
rv = aUri->GetSpec(getter_Copies(spec));
if (NS_FAILED(rv)) break;
if (! spec)
break;
rv = history->AddPage(spec, nsnull /* referrer */, PR_Now());
if (NS_FAILED(rv)) break;
} while (0);