nsCOMPtr<nsIURI> docURL; doc->GetBaseURL(getter_AddRefs(docURL));  rv = docURL->GetSpec(mDocumentBase);
rv = doc->GetBaseURL()->GetSpec(mDocumentBase);
NS_IMETHODIMP nsPluginInstanceOwner::GetDocumentBase(const char* *result){  NS_ENSURE_ARG_POINTER(result);  nsresult rv = NS_OK;  if (mDocumentBase.IsEmpty()) {    if (nsnull == mContext) {      *result = nsnull;      return NS_ERROR_FAILURE;    }        nsCOMPtr<nsIPresShell> shell;    mContext->GetShell(getter_AddRefs(shell));    nsCOMPtr<nsIDocument> doc;    shell->GetDocument(getter_AddRefs(doc));    nsCOMPtr<nsIURI> docURL;    doc->GetBaseURL(getter_AddRefs(docURL));  // should return base + doc url    rv = docURL->GetSpec(mDocumentBase);  }  if (rv == NS_OK)    *result = ToNewCString(mDocumentBase);  return rv;}