really fix bug 12493 - sr=darin, r=radha

move the check for mIOService into its own check
This commit is contained in:
alecf%netscape.com 2002-08-14 22:43:05 +00:00
Родитель e45e88ea9c
Коммит edc333be15
1 изменённых файлов: 11 добавлений и 12 удалений

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

@ -709,20 +709,19 @@ nsWebShell::GetLinkState(const nsACString& aLinkURI, nsLinkState& aState)
nsresult rv;
// get the cached IO service
if (!mIOService) {
mIOService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
if (!mIOService)
mIOService = do_GetService(NS_IOSERVICE_CONTRACTID);
// clean up the url using the right parser
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), aLinkURI, nsnull, nsnull,
mIOService);
if (mIOService) {
// now get the fully canonicalized path
if (NS_SUCCEEDED(rv))
rv = uri->GetSpec(resolvedPath);
}
// clean up the url using the right parser
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), aLinkURI, nsnull, nsnull,
mIOService);
// now get the fully canonicalized path
if (NS_SUCCEEDED(rv))
rv = uri->GetSpec(resolvedPath);
}
PRBool isVisited;