Bug 1631405 - Run nsMixedContentBlocker::AsyncOnChannelRedirect checks in the parent for documents, since this is now supported correctly. r=ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D75449
This commit is contained in:
Matt Woodrow
2020-05-26 21:19:45 +00:00
parent aa45237cd9
commit a0183ff3ee
3 changed files with 6 additions and 4 deletions

View File

@@ -883,8 +883,7 @@ void WindowGlobalParent::AddMixedContentSecurityState(uint32_t aStateFlags) {
aStateFlags,
"Invalid flags specified!");
if ((mMixedContentSecurityState & aStateFlags) ==
mMixedContentSecurityState) {
if ((mMixedContentSecurityState & aStateFlags) == aStateFlags) {
return;
}

View File

@@ -34,6 +34,7 @@
#include "mozilla/LoadInfo.h"
#include "nsISiteSecurityService.h"
#include "prnetdb.h"
#include "nsQueryObject.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/Logging.h"
@@ -44,6 +45,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/net/DNS.h"
#include "mozilla/net/DocumentLoadListener.h"
using namespace mozilla;
using namespace mozilla::dom;
@@ -135,7 +137,9 @@ nsMixedContentBlocker::AsyncOnChannelRedirect(
// 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) {
RefPtr<net::DocumentLoadListener> docListener =
do_QueryObject(is_ipc_channel);
if (is_ipc_channel && !docListener) {
return NS_OK;
}

View File

@@ -61,7 +61,6 @@ disabled=intermitently fails, quite often, bug 487402
[test_unsecureIframeMetaRedirect.html]
disabled=intermittently fails, less often, bug 487632
[test_unsecureIframeRedirect.html]
fail-if = fission
[test_unsecurePicture.html]
[test_unsecurePictureDup.html]
[test_unsecurePictureInIframe.html]