mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
getbuffer to tonewcstring
This commit is contained in:
parent
6f2122578d
commit
a4d14d99aa
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user