NECKO only: fixing MakeAbsolute when loading images, cleanup

This commit is contained in:
andreas.otte%primus-online.de 1999-07-04 22:23:38 +00:00
parent 4cb2c169f8
commit 029524c65d
3 changed files with 4 additions and 3 deletions

View File

@ -1225,7 +1225,7 @@ nsGenericElement::TriggerLink(nsIPresContext& aPresContext,
if (NS_FAILED(rv)) return;
char *absUrl = nsnull;
const char *uriStr = aURLSpec.ToNewCString();
char *uriStr = aURLSpec.ToNewCString();
rv = service->MakeAbsolute(uriStr, baseUri, &absUrl);
nsCRT::free(uriStr);

View File

@ -1225,7 +1225,7 @@ nsGenericElement::TriggerLink(nsIPresContext& aPresContext,
if (NS_FAILED(rv)) return;
char *absUrl = nsnull;
const char *uriStr = aURLSpec.ToNewCString();
char *uriStr = aURLSpec.ToNewCString();
rv = service->MakeAbsolute(uriStr, baseUri, &absUrl);
nsCRT::free(uriStr);

View File

@ -93,9 +93,10 @@ nsHTMLImageLoader::SetURL(const nsString& aNewSpec)
if (NS_FAILED(rv)) return;
char *absUrl = nsnull;
const char *urlSpec = mURLSpec.GetBuffer();
char *urlSpec = mURLSpec.ToNewCString();
rv = service->MakeAbsolute(urlSpec, baseUri, &absUrl);
NS_RELEASE(baseUri);
nsCRT::free(urlSpec);
mURL = absUrl;
delete [] absUrl;
#endif // NECKO