if (NS_SUCCEEDED(rv = mInner->GetTarget(bookmark, kWEB_LastCharset, PR_TRUE, getter_AddRefs(lastCharactersetNode))) && (rv != NS_RDF_NO_VALUE)) { nsCOMPtr<nsIRDFLiteral>	charsetLiteral = do_QueryInterface(lastCharactersetNode);
if (bookmark) {
nsBookmarksService::GetLastCharset(const char *aURI,  PRUnichar **aLastCharset){	if (!aURI)		  return(NS_ERROR_UNEXPECTED);	if (!mInner)		return(NS_ERROR_UNEXPECTED);	NS_PRECONDITION(aLastCharset != nsnull, "null ptr");	if (!aLastCharset)	return NS_ERROR_NULL_POINTER;  nsCOMPtr<nsIRDFResource>	bookmark;	nsresult			rv = nsnull;	if (NS_SUCCEEDED(rv = gRDF->GetResource(aURI, getter_AddRefs(bookmark) )))	{		PRBool			isBookmark = PR_FALSE;		// Note: always use mInner!! Otherwise, could get into an infinite loop		// due to Assert/Change calling UpdateBookmarkLastModifiedDate()		if (NS_SUCCEEDED(rv = mInner->HasAssertion(bookmark, kRDF_type, kNC_Bookmark,			PR_TRUE, &isBookmark)) && (isBookmark == PR_TRUE))		{      nsCOMPtr<nsIRDFNode>	lastCharactersetNode;			if (NS_SUCCEEDED(rv = mInner->GetTarget(bookmark, kWEB_LastCharset, PR_TRUE,				getter_AddRefs(lastCharactersetNode))) && (rv != NS_RDF_NO_VALUE))      {	        nsCOMPtr<nsIRDFLiteral>	charsetLiteral = do_QueryInterface(lastCharactersetNode);	        if (!charsetLiteral)	return(NS_ERROR_NO_INTERFACE);	        	        if (NS_FAILED(rv = charsetLiteral->GetValue(aLastCharset))) return(rv);	        if (!*aLastCharset)	return(NS_ERROR_NULL_POINTER);          return(NS_OK);			}    }  }	*aLastCharset = nsnull;	return NS_RDF_NO_VALUE;}