зеркало из https://github.com/mozilla/gecko-dev.git
Nitpicky cleanup.
This commit is contained in:
Родитель
89e0ac5f08
Коммит
be3e3ef47b
|
@ -1375,8 +1375,6 @@ nsGlobalHistory::ArcLabelsIn(nsIRDFNode* aNode,
|
||||||
|
|
||||||
nsCOMPtr<nsIRDFResource> resource = do_QueryInterface(aNode);
|
nsCOMPtr<nsIRDFResource> resource = do_QueryInterface(aNode);
|
||||||
if (resource && IsURLInHistory(resource)) {
|
if (resource && IsURLInHistory(resource)) {
|
||||||
// If it's a resource, be optimistic and assume that it's actually
|
|
||||||
// in the history.
|
|
||||||
return NS_NewSingletonEnumerator(aLabels, kNC_child);
|
return NS_NewSingletonEnumerator(aLabels, kNC_child);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1388,6 +1386,10 @@ NS_IMETHODIMP
|
||||||
nsGlobalHistory::ArcLabelsOut(nsIRDFResource* aSource,
|
nsGlobalHistory::ArcLabelsOut(nsIRDFResource* aSource,
|
||||||
nsISimpleEnumerator** aLabels)
|
nsISimpleEnumerator** aLabels)
|
||||||
{
|
{
|
||||||
|
NS_PRECONDITION(aSource != nsnull, "null ptr");
|
||||||
|
if (! aSource)
|
||||||
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
if ((aSource == kNC_HistoryRoot) ||
|
if ((aSource == kNC_HistoryRoot) ||
|
||||||
|
@ -1396,8 +1398,8 @@ nsGlobalHistory::ArcLabelsOut(nsIRDFResource* aSource,
|
||||||
return NS_NewSingletonEnumerator(aLabels, kNC_child);
|
return NS_NewSingletonEnumerator(aLabels, kNC_child);
|
||||||
}
|
}
|
||||||
else if (IsURLInHistory(aSource)) {
|
else if (IsURLInHistory(aSource)) {
|
||||||
// We'll be optimistic and _assume_ that this is in the history,
|
// If the URL is in the history, then it'll have all the
|
||||||
// in which case it'll have all the history attributes.
|
// appropriate attributes.
|
||||||
nsCOMPtr<nsISupportsArray> array;
|
nsCOMPtr<nsISupportsArray> array;
|
||||||
rv = NS_NewISupportsArray(getter_AddRefs(array));
|
rv = NS_NewISupportsArray(getter_AddRefs(array));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче