mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 1084504 - fix Mixed Content Blocking for redirects in e10s. r=mrbkap
This commit is contained in:
parent
f3e352240e
commit
8761a49c15
@ -19,6 +19,7 @@
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIParentChannel.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsISecureBrowserUI.h"
|
||||
@ -214,6 +215,16 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// If we are in the parent process in e10s, we don't have access to the
|
||||
// document node, and hence ShouldLoad will fail when we try to get
|
||||
// the docShell. If that's the case, ignore mixed content checks
|
||||
// on redirects in the parent. Let the child check for mixed content.
|
||||
nsCOMPtr<nsIParentChannel> is_ipc_channel;
|
||||
NS_QueryNotificationCallbacks(aNewChannel, is_ipc_channel);
|
||||
if (is_ipc_channel) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIURI> oldUri;
|
||||
rv = aOldChannel->GetURI(getter_AddRefs(oldUri));
|
||||
|
Loading…
x
Reference in New Issue
Block a user