mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
bug 51338, cookie nag box for foreign cookies is not modal, r=valeski
This commit is contained in:
parent
6cfd93dbab
commit
59c12cbc54
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user