getbuffer to tonewcstring change

This commit is contained in:
valeski%netscape.com 1999-07-07 14:47:19 +00:00
parent 7baa41ff09
commit ddf0252fa5
3 changed files with 9 additions and 3 deletions

View File

@ -188,8 +188,10 @@ nsPrefMigrationProgressDialog::CreateProfileProgressDialog()
}
nsIURI *uri = nsnull;
const char *uriStr = urlString.GetBuffer();
char *uriStr = urlString.ToNewCString();
if (!uriStr) return NS_ERROR_OUT_OF_MEMORY;
rv = service->NewURI(urlString, nsnull, &uri);
nsCRT::free(uriStr);
if (NS_FAILED(rv)) {
DEBUG_PRINTF(PR_STDOUT, "cannot get uri\n");
return NS_OK;

View File

@ -856,8 +856,10 @@ nsSilentDownloadTask::DownloadSelf(PRInt32 range)
if (NS_FAILED(result)) return result;
nsIURI *uri = nsnull;
const char *uriStr = mUrl.GetBuffer();
char *uriStr = mUrl.ToNewCString();
if (!uriStr) return NS_ERROR_OUT_OF_MEMORY;
result = service->NewURI(uriStr, nsnull, &uri);
nsCRT::free(uriStr);
if (NS_FAILED(result)) return result;
result = uri->QueryInterface(nsIURI::GetIID(), (void**)&pURL);

View File

@ -416,8 +416,10 @@ GtkMozillaContainer::StartStream(const char *base_url, const char *action,
if (NS_FAILED(rv)) return rv;
nsIURI *uri = nsnull;
const char *uriStr = url_str.GetBuffer();
char *uriStr = url_str.ToNewCString();
if (!uriStr) return NS_ERROR_OUT_OF_MEMORY;
rv = service->NewURI(uriStr, nsnull, &uri);
nsCRT::uriStr);
if (NS_FAILED(rv)) return rv;
rv = uri->QueryInterface(nsIURI::GetIID(), (void**)&url);