Tweak resource cache usage. Change from putterman, Review from me

This commit is contained in:
rjc%netscape.com 2000-01-11 22:03:53 +00:00
Родитель 416a981c72
Коммит 816e4b7276
3 изменённых файлов: 42 добавлений и 27 удалений

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

@ -2066,15 +2066,20 @@ RDFGenericBuilderImpl::BuildContentFromTemplate(nsIContent *aTemplateNode,
if (! isUnique) {
rv = NS_ERROR_UNEXPECTED;
if (gXULSortService && isResourceElement) {
nsCOMPtr<nsIRDFDataSource> tempCache = nsnull;
rv = gXULSortService->InsertContainerNode(mDB, getter_AddRefs(tempCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
if (tempCache)
{
mCache = tempCache;
}
if (gXULSortService && isResourceElement)
{
if (mCache)
{
rv = gXULSortService->InsertContainerNode(mDB,
(nsIRDFDataSource **)&mCache,
mRoot, trueParent, aRealNode, realKid, aNotify);
}
else
{
rv = gXULSortService->InsertContainerNode(mDB,
getter_AddRefs(mCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
}
}
if (NS_FAILED(rv)) {

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

@ -2066,15 +2066,20 @@ RDFGenericBuilderImpl::BuildContentFromTemplate(nsIContent *aTemplateNode,
if (! isUnique) {
rv = NS_ERROR_UNEXPECTED;
if (gXULSortService && isResourceElement) {
nsCOMPtr<nsIRDFDataSource> tempCache = nsnull;
rv = gXULSortService->InsertContainerNode(mDB, getter_AddRefs(tempCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
if (tempCache)
{
mCache = tempCache;
}
if (gXULSortService && isResourceElement)
{
if (mCache)
{
rv = gXULSortService->InsertContainerNode(mDB,
(nsIRDFDataSource **)&mCache,
mRoot, trueParent, aRealNode, realKid, aNotify);
}
else
{
rv = gXULSortService->InsertContainerNode(mDB,
getter_AddRefs(mCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
}
}
if (NS_FAILED(rv)) {

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

@ -2066,15 +2066,20 @@ RDFGenericBuilderImpl::BuildContentFromTemplate(nsIContent *aTemplateNode,
if (! isUnique) {
rv = NS_ERROR_UNEXPECTED;
if (gXULSortService && isResourceElement) {
nsCOMPtr<nsIRDFDataSource> tempCache = nsnull;
rv = gXULSortService->InsertContainerNode(mDB, getter_AddRefs(tempCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
if (tempCache)
{
mCache = tempCache;
}
if (gXULSortService && isResourceElement)
{
if (mCache)
{
rv = gXULSortService->InsertContainerNode(mDB,
(nsIRDFDataSource **)&mCache,
mRoot, trueParent, aRealNode, realKid, aNotify);
}
else
{
rv = gXULSortService->InsertContainerNode(mDB,
getter_AddRefs(mCache),
mRoot, trueParent, aRealNode, realKid, aNotify);
}
}
if (NS_FAILED(rv)) {