зеркало из https://github.com/mozilla/pjs.git
Fix bug where search engines appear twice the first time (due to order of discovery).
This commit is contained in:
Родитель
52d88132d3
Коммит
c122ed1f81
|
@ -677,6 +677,8 @@ InternetSearchDataSource::GetTargets(nsIRDFResource *source,
|
|||
|
||||
if (mInner)
|
||||
{
|
||||
rv = mInner->GetTargets(source, property, tv, targets);
|
||||
|
||||
// defer search engine discovery until needed; small startup time improvement
|
||||
if (((source == kNC_SearchEngineRoot) || isSearchURI(source)) && (property == kNC_Child)
|
||||
&& (mEngineListBuilt == PR_FALSE))
|
||||
|
@ -700,8 +702,6 @@ InternetSearchDataSource::GetTargets(nsIRDFResource *source,
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
rv = mInner->GetTargets(source, property, tv, targets);
|
||||
}
|
||||
if (isSearchURI(source))
|
||||
{
|
||||
|
@ -1475,11 +1475,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
|
|||
return(rv);
|
||||
if (!context) return(NS_ERROR_UNEXPECTED);
|
||||
|
||||
char *actionStr = action.ToNewCString();
|
||||
if (!actionStr) return(NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIURI> url;
|
||||
if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), actionStr)))
|
||||
if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), action)))
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
// XXX: Null LoadGroup ?
|
||||
|
@ -1517,9 +1514,6 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
|
|||
}
|
||||
}
|
||||
|
||||
nsCRT::free(actionStr);
|
||||
actionStr = nsnull;
|
||||
|
||||
// dispose of any last HTML results page
|
||||
if (mInner)
|
||||
{
|
||||
|
|
|
@ -677,6 +677,8 @@ InternetSearchDataSource::GetTargets(nsIRDFResource *source,
|
|||
|
||||
if (mInner)
|
||||
{
|
||||
rv = mInner->GetTargets(source, property, tv, targets);
|
||||
|
||||
// defer search engine discovery until needed; small startup time improvement
|
||||
if (((source == kNC_SearchEngineRoot) || isSearchURI(source)) && (property == kNC_Child)
|
||||
&& (mEngineListBuilt == PR_FALSE))
|
||||
|
@ -700,8 +702,6 @@ InternetSearchDataSource::GetTargets(nsIRDFResource *source,
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
rv = mInner->GetTargets(source, property, tv, targets);
|
||||
}
|
||||
if (isSearchURI(source))
|
||||
{
|
||||
|
@ -1475,11 +1475,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
|
|||
return(rv);
|
||||
if (!context) return(NS_ERROR_UNEXPECTED);
|
||||
|
||||
char *actionStr = action.ToNewCString();
|
||||
if (!actionStr) return(NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIURI> url;
|
||||
if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), actionStr)))
|
||||
if (NS_SUCCEEDED(rv = NS_NewURI(getter_AddRefs(url), action)))
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
// XXX: Null LoadGroup ?
|
||||
|
@ -1517,9 +1514,6 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin
|
|||
}
|
||||
}
|
||||
|
||||
nsCRT::free(actionStr);
|
||||
actionStr = nsnull;
|
||||
|
||||
// dispose of any last HTML results page
|
||||
if (mInner)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче