bug 51338, cookie nag box for foreign cookies is not modal, r=valeski

This commit is contained in:
morse%netscape.com 2000-09-14 14:49:30 +00:00
parent 6cfd93dbab
commit 59c12cbc54

View File

@ -220,19 +220,11 @@ nsCookieHTTPNotify::AsyncExamineResponse(nsISupports *aContext)
nsCOMPtr<nsILoadGroup> pLoadGroup;
rv = pHTTPConnection->GetLoadGroup(getter_AddRefs(pLoadGroup));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIChannel> pChannel;
if (pLoadGroup) {
rv = pLoadGroup->GetDefaultLoadChannel(getter_AddRefs(pChannel));
if (NS_FAILED(rv)) return rv;
}
nsCOMPtr<nsIInterfaceRequestor> pInterfaces;
nsCOMPtr<nsIPrompt> pPrompter;
pHTTPConnection->GetNotificationCallbacks(getter_AddRefs(pInterfaces));
if (pInterfaces)
pInterfaces->GetInterface(NS_GET_IID(nsIPrompt), getter_AddRefs(pPrompter));
nsCOMPtr<nsIURI> pFirstURL;
if (pChannel) {
rv = pChannel->GetURI(getter_AddRefs(pFirstURL));
@ -241,6 +233,17 @@ nsCookieHTTPNotify::AsyncExamineResponse(nsISupports *aContext)
}
if (NS_FAILED(rv)) return rv;
// Get the prompter
nsCOMPtr<nsIInterfaceRequestor> pInterfaces;
nsCOMPtr<nsIPrompt> pPrompter;
if (pChannel) {
pChannel->GetNotificationCallbacks(getter_AddRefs(pInterfaces));
} else {
pHTTPConnection->GetNotificationCallbacks(getter_AddRefs(pInterfaces));
}
if (pInterfaces)
pInterfaces->GetInterface(NS_GET_IID(nsIPrompt), getter_AddRefs(pPrompter));
// Get the expires
nsXPIDLCString expiresHeader;
rv = pHTTPConnection->GetResponseHeader(mExpiresHeader, getter_Copies(expiresHeader));