HE he = (HE) PR_Malloc(sizeof(HistoryEntry)); if (he) { he->date = time; he->url = (char*) uri; he->referer = (char*) referer; mPendingWrites.AppendElement(he); return(NS_OK); } return(NS_ERROR_OUT_OF_MEMORY);
NS_PRECONDITION(aURI != nsnull, "null ptr"); if (! aURI) return NS_ERROR_NULL_POINTER;  HistoryEntry* he = new HistoryEntry(aTime, aURI, aRefererURI); if (! he) return NS_ERROR_OUT_OF_MEMORY;  mPendingWrites.AppendElement(he); return NS_OK;
nsHistoryDataSource::AddPage (const char* uri, const char* referer, PRTime time){	HE he = (HE) PR_Malloc(sizeof(HistoryEntry));	if (he)	{		he->date = time;		he->url = (char*) uri;		he->referer = (char*) referer;		mPendingWrites.AppendElement(he);		return(NS_OK);	}	return(NS_ERROR_OUT_OF_MEMORY);}