зеркало из https://github.com/mozilla/gecko-dev.git
Bug 22294. Use aURI's spec (rather than mURL) to cough up a URL for global history. r=mscott
This commit is contained in:
Родитель
8761cb7178
Коммит
74c48d36ca
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче