bug 75748, crash when viewing a particular message, r=sspitzer, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@92224 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
5fc38cad21
commit
89af28ed99
@ -122,8 +122,7 @@ nsCookieService::OnEndURLLoad
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCookieService::GetCookieString(nsIURI *aURL, char ** aCookie)
|
||||
{
|
||||
nsCookieService::GetCookieString(nsIURI *aURL, char ** aCookie) {
|
||||
nsXPIDLCString spec;
|
||||
nsresult rv = aURL->GetSpec(getter_Copies(spec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
@ -132,18 +131,21 @@ nsCookieService::GetCookieString(nsIURI *aURL, char ** aCookie)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCookieService::GetCookieStringFromHttp(nsIURI *aURL, nsIURI *aFirstURL, char ** aCookie)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aURL);
|
||||
NS_ENSURE_ARG_POINTER(aFirstURL);
|
||||
|
||||
nsCookieService::GetCookieStringFromHttp(nsIURI *aURL, nsIURI *aFirstURL, char ** aCookie) {
|
||||
if (!aURL) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsXPIDLCString spec;
|
||||
nsresult rv = aURL->GetSpec(getter_Copies(spec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsXPIDLCString firstSpec;
|
||||
rv = aFirstURL->GetSpec(getter_Copies(firstSpec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
*aCookie = COOKIE_GetCookieFromHttp((char *)(const char *)spec, (char *)(const char *)firstSpec);
|
||||
if (aFirstURL) {
|
||||
nsXPIDLCString firstSpec;
|
||||
rv = aFirstURL->GetSpec(getter_Copies(firstSpec));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
*aCookie = COOKIE_GetCookieFromHttp((char *)(const char *)spec, (char *)(const char *)firstSpec);
|
||||
} else {
|
||||
*aCookie = COOKIE_GetCookieFromHttp((char *)(const char *)spec, nsnull);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -620,7 +620,7 @@ PUBLIC char *
|
||||
COOKIE_GetCookieFromHttp(char * address, char * firstAddress) {
|
||||
|
||||
if ((cookie_GetBehaviorPref() == PERMISSION_DontAcceptForeign) &&
|
||||
cookie_isForeign(address, firstAddress)) {
|
||||
(!firstAddress || cookie_isForeign(address, firstAddress))) {
|
||||
|
||||
/*
|
||||
* WARNING!!! This is a different behavior than 4.x. In 4.x we used this pref to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user