getbuffer to tonewcstring

This commit is contained in:
valeski%netscape.com 1999-07-07 14:50:42 +00:00
parent 6f2122578d
commit a4d14d99aa
2 changed files with 6 additions and 2 deletions

View File

@ -448,8 +448,10 @@ nsDOMPropsCore::ShowProperties(const nsString& aUrl, nsIDOMWindow* aParent, nsID
if (NS_FAILED(rv)) return rv;
nsIURI *uri = nsnull;
const char *uriStr = aUrl.GetBuffer();
char *uriStr = aUrl.ToNewCString();
if (!uriStr) return NS_ERROR_OUT_OF_MEMORY;
rv = service->NewURI(uriStr, nsnull, &uri);
nsCRT::free(uriStr);
if (NS_FAILED(rv)) return rv;
rv = uri->QueryInterface(nsIURI::GetIID(), (void**)&urlObj);

View File

@ -81,8 +81,10 @@ nsSoftwareUpdateListener::nsSoftwareUpdateListener(const nsString& fromURL, cons
// XXX NECKO verb? getter?
nsIChannel *channel = nsnull;
const char *urlStr = fromURL.GetBuffer();
char *urlStr = fromURL.ToNewCString();
if (!urlStr) return NS_ERROR_OUT_OF_MEMORY;
rv = service->NewChannel("load", urlStr, nsnull, nsnull, &channel);
nsCRT::free(urlStr);
if (NS_FAILED(mResult)) return;
rv = channel->AsyncRead(0, -1, nsnull, this);