Fixed assertion/malfunction when timers are set on bookmarks because the bookmark service's QI didn't return nsIStreamListener. r=rjc

This commit is contained in:
warren%netscape.com 2007-09-12 17:47:17 +00:00
Родитель 8e0c1d6954
Коммит caf7c2c48a
1 изменённых файлов: 7 добавлений и 31 удалений

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

@ -2614,37 +2614,13 @@ nsBookmarksService::Release()
}
}
NS_IMETHODIMP
nsBookmarksService::QueryInterface(REFNSIID aIID, void **aResult)
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsIBookmarksService)) ||
aIID.Equals(kISupportsIID))
{
*aResult = NS_STATIC_CAST(nsIBookmarksService*, this);
}
else if (aIID.Equals(NS_GET_IID(nsIRDFDataSource))) {
*aResult = NS_STATIC_CAST(nsIRDFDataSource*, this);
}
else if (aIID.Equals(NS_GET_IID(nsIRDFRemoteDataSource))) {
*aResult = NS_STATIC_CAST(nsIRDFRemoteDataSource*, this);
}
else {
*aResult = nsnull;
return NS_NOINTERFACE;
}
NS_ADDREF(this);
return NS_OK;
}
NS_IMPL_QUERY_INTERFACE6(nsBookmarksService,
nsIBookmarksService,
nsIRDFDataSource,
nsIRDFRemoteDataSource,
nsIRDFObserver,
nsIStreamListener,
nsIStreamObserver)
////////////////////////////////////////////////////////////////////////
// nsIBookmarksService