nsCOMPtr<nsIURI> docURL( dont_AddRef(doc->GetDocumentURL()) );
nsCOMPtr<nsIURI> docURL; doc->GetBaseURL(*getter_AddRefs(docURL));
NS_IMETHODIMP nsPluginInstanceOwner::GetDocumentBase(const char* *result){  nsresult rv = NS_OK;  if (nsnull == mDocumentBase) {    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( dont_AddRef(doc->GetDocumentURL()) );    rv = docURL->GetSpec(&mDocumentBase);  }  if (rv == NS_OK)    *result = mDocumentBase;  return rv;}