зеркало из 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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче