char *uriStr = aLink.ToNewCString();
char *uriStr = ToNewCString(aLink);
void RobotSink::ProcessLink(const nsString& aLink){  nsAutoString absURLSpec; absURLSpec.Assign(aLink);  // Make link absolute  // XXX base tag handling  nsIURI* docURL = mDocumentURL;  if (nsnull != docURL) {    nsIURI* absurl;    nsresult rv;    nsCOMPtr<nsIIOService> service(do_GetService(kIOServiceCID, &rv));    if (NS_FAILED(rv)) return;    nsIURI *uri = nsnull, *baseUri = nsnull;    rv = mDocumentURL->QueryInterface(NS_GET_IID(nsIURI), (void**)&baseUri);    if (NS_FAILED(rv)) return;    char *uriStr = aLink.ToNewCString();    if (!uriStr) return;    rv = service->NewURI(uriStr, baseUri, &uri);    nsCRT::free(uriStr);    NS_RELEASE(baseUri);    if (NS_FAILED(rv)) return;    rv = uri->QueryInterface(NS_GET_IID(nsIURI), (void**)&absurl);    NS_RELEASE(uri);    if (NS_OK == rv) {      absURLSpec.Truncate();      char* str;      absurl->GetSpec(&str);      absURLSpec.AssignWithConversion(str);      nsCRT::free(str);    }  }  // Now give link to robot observers  PRInt32 i, n = mObservers.Count();  for (i = 0; i < n; i++) {    nsIRobotSinkObserver* cop = (nsIRobotSinkObserver*)mObservers.ElementAt(i);    cop->ProcessLink(absURLSpec);  }}