mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1217876 - nsIXMLHttpRequest must show the authentication prompt correctly when used by addons in e10s, r=mayhemer
This commit is contained in:
parent
16a43fb17e
commit
52b87b9b14
@ -10,9 +10,12 @@
|
||||
#include "HttpChannelParentListener.h"
|
||||
#include "mozilla/net/HttpChannelParent.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsIRedirectChannelRegistrar.h"
|
||||
#include "nsIAuthPrompt.h"
|
||||
#include "nsIAuthPrompt2.h"
|
||||
#include "nsIHttpEventSink.h"
|
||||
#include "nsIHttpHeaderVisitor.h"
|
||||
#include "nsIRedirectChannelRegistrar.h"
|
||||
#include "nsIPromptFactory.h"
|
||||
#include "nsQueryObject.h"
|
||||
|
||||
using mozilla::Unused;
|
||||
@ -132,6 +135,17 @@ HttpChannelParentListener::GetInterface(const nsIID& aIID, void **result)
|
||||
return ir->GetInterface(aIID, result);
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAuthPrompt)) ||
|
||||
aIID.Equals(NS_GET_IID(nsIAuthPrompt2))) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPromptFactory> wwatch =
|
||||
do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return wwatch->GetPrompt(nullptr, aIID,
|
||||
reinterpret_cast<void**>(result));
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user