result = url->GetQuery(&search);
result = url->GetEscapedQuery(&search);
nsHTMLAnchorElement::GetSearch(nsAWritableString& aSearch){  nsAutoString href;  nsIURI *uri;  nsresult result = NS_OK;  result = GetHref(href);  if (NS_OK == result) {    result = NS_NewURI(&uri, href);    if (NS_OK == result) {      char *search;      nsIURL* url;      result = uri->QueryInterface(NS_GET_IID(nsIURL), (void**)&url);      if (NS_SUCCEEDED(result)) {        result = url->GetQuery(&search);        NS_RELEASE(url);      }      if (result == NS_OK && (nsnull != search) && ('\0' != *search)) {        aSearch.Assign(NS_LITERAL_STRING("?"));        aSearch.Append(NS_ConvertASCIItoUCS2(search));        nsCRT::free(search);      }      else {        aSearch.SetLength(0);      }      NS_RELEASE(uri);    }  }  return result;}