nsIWebShell* shell = GetTarget(target.GetUnicode()); if (nsnull != shell) {  PRUnichar* str = mURL.ToNewUnicode(); (void)shell->LoadURL(aURLSpec, aPostDataStream, PR_TRUE, nsIChannel::LOAD_NORMAL, 0, nsnull, str); Recycle(str); NS_RELEASE(shell);
nsCOMPtr<nsIURI> uri; NS_NewURI(getter_AddRefs(uri), nsDependentString(aURLSpec), nsnull);      if (!uri && NS_SUCCEEDED(EnsureContentListener())) { nsCOMPtr<nsIURIContentListener> listener = do_QueryInterface(mContentListener); nsCAutoString spec; spec.AssignWithConversion(aURLSpec); PRBool abort = PR_FALSE; uri = do_CreateInstance(kSimpleURICID, &rv); NS_ASSERTION(NS_SUCCEEDED(rv), "can't create simple uri"); if (NS_SUCCEEDED(rv)) { rv = uri->SetSpec(spec); NS_ASSERTION(NS_SUCCEEDED(rv), "spec is invalid"); if (NS_SUCCEEDED(rv)) { listener->OnStartURIOpen(uri, &abort); } } return;
nsWebShell::HandleLinkClickEvent(nsIContent *aContent,                                 nsLinkVerb aVerb,                                 const PRUnichar* aURLSpec,                                 const PRUnichar* aTargetSpec,                                 nsIInputStream* aPostDataStream){  nsAutoString target(aTargetSpec);  switch(aVerb) {    case eLinkVerb_New:      target.SetString("_blank");      // Fall into replace case    case eLinkVerb_Replace:      {        nsIWebShell* shell = GetTarget(target.GetUnicode());        if (nsnull != shell) {          // Allocate since mURL may change beneath us          PRUnichar* str = mURL.ToNewUnicode();          (void)shell->LoadURL(aURLSpec, aPostDataStream,                               PR_TRUE, nsIChannel::LOAD_NORMAL,                               0, nsnull, str);          Recycle(str);          NS_RELEASE(shell);        }      }      break;    case eLinkVerb_Embed:    default:      ;      // XXX Need to do this  }}