mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
replaced calls to deprecated string methods
This commit is contained in:
parent
9b23015426
commit
c82c1f2d0b
@ -81,11 +81,11 @@ nsCookieService::GetCookieString(nsIURI *aURL, nsString& aCookie) {
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
char *cookie = COOKIE_GetCookie((char *)(const char *)spec);
|
||||
if (nsnull != cookie) {
|
||||
aCookie.SetString(cookie);
|
||||
aCookie.Assign(cookie);
|
||||
nsCRT::free(cookie);
|
||||
} else {
|
||||
// No Cookie isn't an error condition.
|
||||
aCookie.SetString("");
|
||||
aCookie.Truncate();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -100,11 +100,11 @@ nsCookieService::GetCookieStringFromHTTP(nsIURI *aURL, nsIURI *aFirstURL, nsStri
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
char *cookie = COOKIE_GetCookieFromHttp((char *)(const char *)spec, (char *)(const char *)firstSpec);
|
||||
if (nsnull != cookie) {
|
||||
aCookie.SetString(cookie);
|
||||
aCookie.Assign(cookie);
|
||||
nsCRT::free(cookie);
|
||||
} else {
|
||||
// No Cookie isn't an error condition.
|
||||
aCookie.SetString("");
|
||||
aCookie.Truncate();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user