nsXPIDLCString spec; uri->GetSpec(getter_Copies(spec));
nsCAutoString spec; uri->GetSpec(spec);
NS_IMETHODIMP nsBrowserContentHandler::HandleContent(const char * aContentType,                                                     const char * aCommand,                                                     nsISupports * aWindowContext,                                                     nsIRequest * aRequest){  // create a new browser window to handle the content  NS_ENSURE_ARG(aRequest);  nsCOMPtr<nsIDOMWindow> parentWindow;  if (aWindowContext)    parentWindow = do_GetInterface(aWindowContext);  nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(aRequest);  if (!aChannel) return NS_ERROR_FAILURE;  nsCOMPtr<nsIURI> uri;  aChannel->GetURI(getter_AddRefs(uri));  NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE);  nsXPIDLCString spec;  uri->GetSpec(getter_Copies(spec));  nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));  if (wwatch) {    nsCOMPtr<nsIDOMWindow> newWindow;    wwatch->OpenWindow(parentWindow, spec, "", 0, 0,              getter_AddRefs(newWindow));  }  // now abort the current channel load...  aRequest->Cancel(NS_BINDING_ABORTED);  return NS_OK;}