summaryrefslogtreecommitdiff
path: root/docshell/base
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 21:47:27 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-22 21:47:27 +0200
commit29bd11c3cd6ff41f7167530f9bbcd9d195b7c427 (patch)
tree5eaab80adebcfd3f0a00ab9ac2e5e3e8d0365c97 /docshell/base
parentdbfad99a51062e663da19266219191c0dc3521be (diff)
downloaduxp-29bd11c3cd6ff41f7167530f9bbcd9d195b7c427.tar.gz
Bug 1182569: Use AsyncOpen2 for docshell loads
native in moebius
Diffstat (limited to 'docshell/base')
-rw-r--r--docshell/base/nsDocShell.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index b1fcc5c23a..6810d01792 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -69,7 +69,6 @@
#include "nsIScriptSecurityManager.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIScrollableFrame.h"
-#include "nsContentPolicyUtils.h" // NS_CheckContentLoadPolicy(...)
#include "nsISeekableStream.h"
#include "nsAutoPtr.h"
#include "nsQueryObject.h"
@@ -1644,7 +1643,7 @@ nsDocShell::LoadStream(nsIInputStream* aStream, nsIURI* aURI,
uri,
aStream,
triggeringPrincipal,
- nsILoadInfo::SEC_NORMAL,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
aContentType,
aContentCharset);
@@ -9943,23 +9942,6 @@ nsDocShell::InternalLoad(nsIURI* aURI,
rv = extraStr->SetData(msg);
NS_ENSURE_SUCCESS(rv, rv);
- int16_t shouldLoad = nsIContentPolicy::ACCEPT;
- rv = NS_CheckContentLoadPolicy(contentType,
- aURI,
- aTriggeringPrincipal,
- requestingContext,
- EmptyCString(), // mime guess
- extraStr, // extra
- &shouldLoad);
-
- if (NS_FAILED(rv) || NS_CP_REJECTED(shouldLoad)) {
- if (NS_SUCCEEDED(rv) && shouldLoad == nsIContentPolicy::REJECT_TYPE) {
- return NS_ERROR_CONTENT_BLOCKED_SHOW_ALT;
- }
-
- return NS_ERROR_CONTENT_BLOCKED;
- }
-
// If HSTS priming was set by nsMixedContentBlocker::ShouldLoad, and we
// would block due to mixed content, go ahead and block here. If we try to
// proceed with priming, we will error out later on.
@@ -10949,7 +10931,8 @@ nsDocShell::DoURILoad(nsIURI* aURI,
}
nsLoadFlags loadFlags = mDefaultLoadFlags;
- nsSecurityFlags securityFlags = nsILoadInfo::SEC_NORMAL;
+ nsSecurityFlags securityFlags =
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
if (aFirstParty) {
// tag first party URL loads