mDB->AddObserver(this);
if (mDB) { nsresult rv; mDB->AddObserver(this);    nsCOMPtr<nsIDOMXULElement> element( do_QueryInterface(mRoot) ); if (element) { rv = element->SetDatabase(aDataBase); if (NS_FAILED(rv)) return rv; } else {   rv = AddDatabasePropertyToHTMLElement(mRoot, mDB); if (NS_FAILED(rv)) return rv; } }
RDFGenericBuilderImpl::SetDataBase(nsIRDFCompositeDataSource* aDataBase){    NS_PRECONDITION(aDataBase != nsnull, "null ptr");    if (! aDataBase)        return NS_ERROR_NULL_POINTER;    NS_PRECONDITION(mDB == nsnull, "already initialized");    if (mDB)        return NS_ERROR_ALREADY_INITIALIZED;    mDB = aDataBase;    NS_ADDREF(mDB);    mDB->AddObserver(this);    return NS_OK;}