зеркало из https://github.com/mozilla/pjs.git
Bug 195908 Cookie rewrite phase 2 - patch for un-inited variable
patch by dwitte@stanford.edu r=mvl@exedo.nl sr=alecf
This commit is contained in:
Родитель
e8e5aad56e
Коммит
fcd2cd3743
|
@ -254,18 +254,13 @@ NS_IMETHODIMP
|
||||||
nsCookieService::SetCookieString(nsIURI *aHostURI, nsIPrompt *aPrompt, const char *aCookieHeader, nsIHttpChannel *aHttpChannel)
|
nsCookieService::SetCookieString(nsIURI *aHostURI, nsIPrompt *aPrompt, const char *aCookieHeader, nsIHttpChannel *aHttpChannel)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIURI> firstURI;
|
nsCOMPtr<nsIURI> firstURI;
|
||||||
nsresult rv;
|
|
||||||
|
|
||||||
if (aHttpChannel) {
|
if (aHttpChannel) {
|
||||||
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(aHttpChannel);
|
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(aHttpChannel);
|
||||||
if (!httpInternal) {
|
if (!httpInternal ||
|
||||||
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to QueryInterface httpInternal");
|
NS_FAILED(httpInternal->GetDocumentURI(getter_AddRefs(firstURI)))) {
|
||||||
return rv;
|
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to determine first URI");
|
||||||
}
|
return NS_OK;
|
||||||
rv = httpInternal->GetDocumentURI(getter_AddRefs(firstURI));
|
|
||||||
if (NS_FAILED(rv)) {
|
|
||||||
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to determine first URL");
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче