This fixes many crashes caused by illegal uses of the nsStdURL.
This also allows a plugable protocol to provide their own url parser.
This commit is contained in:
dougt%netscape.com 2007-09-06 21:58:12 +00:00
Родитель e7c5aaa685
Коммит 5d0748fadb
1 изменённых файлов: 1 добавлений и 5 удалений

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

@ -1216,11 +1216,7 @@ InternetSearchDataSource::GetCategoryList()
rv = NS_GetSpecialDirectory(NS_APP_SEARCH_50_FILE, getter_AddRefs(searchFile));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIFileURL> searchFileURL(do_CreateInstance("@mozilla.org/network/standard-url;1", &rv));
if (NS_FAILED(rv)) return rv;
rv = searchFileURL->SetFile(searchFile);
if (NS_FAILED(rv)) return rv;
rv = searchFileURL->GetSpec(getter_Copies(searchFileURLSpec));
searchFile->GetURL(getter_Copies(searchFileURLSpec));
if (NS_FAILED(rv)) return rv;
rv = remoteCategoryDataSource->Init(searchFileURLSpec);
if (NS_FAILED(rv)) return rv;