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:
timeless%mozdev.org 2003-03-23 10:20:20 +00:00
Родитель e8e5aad56e
Коммит fcd2cd3743
1 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -254,18 +254,13 @@ NS_IMETHODIMP
nsCookieService::SetCookieString(nsIURI *aHostURI, nsIPrompt *aPrompt, const char *aCookieHeader, nsIHttpChannel *aHttpChannel)
{
nsCOMPtr<nsIURI> firstURI;
nsresult rv;
if (aHttpChannel) {
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(aHttpChannel);
if (!httpInternal) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to QueryInterface httpInternal");
return rv;
}
rv = httpInternal->GetDocumentURI(getter_AddRefs(firstURI));
if (NS_FAILED(rv)) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to determine first URL");
return rv;
if (!httpInternal ||
NS_FAILED(httpInternal->GetDocumentURI(getter_AddRefs(firstURI)))) {
COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "unable to determine first URI");
return NS_OK;
}
}