Bug 1820576 - Make uriloader/ buildable outside of a unified build environment r=andi

Differential Revision: https://phabricator.services.mozilla.com/D171734
This commit is contained in:
serge-sans-paille 2023-03-15 07:30:37 +00:00
parent 37a9268fca
commit 2d3ee76bff
2 changed files with 5 additions and 5 deletions

View File

@ -41,5 +41,3 @@ LOCAL_INCLUDES += [
] ]
FINAL_LIBRARY = "xul" FINAL_LIBRARY = "xul"
REQUIRES_UNIFIED_BUILD = True

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsURILoader.h" #include "nsURILoader.h"
#include "nsComponentManagerUtils.h"
#include "nsIURIContentListener.h" #include "nsIURIContentListener.h"
#include "nsIContentHandler.h" #include "nsIContentHandler.h"
#include "nsILoadGroup.h" #include "nsILoadGroup.h"
@ -70,7 +71,8 @@ nsDocumentOpenInfo::nsDocumentOpenInfo(nsIInterfaceRequestor* aWindowContext,
mFlags(aFlags), mFlags(aFlags),
mURILoader(aURILoader), mURILoader(aURILoader),
mDataConversionDepthLimit( mDataConversionDepthLimit(
StaticPrefs::general_document_open_conversion_depth_limit()) {} mozilla::StaticPrefs::
general_document_open_conversion_depth_limit()) {}
nsDocumentOpenInfo::nsDocumentOpenInfo(uint32_t aFlags, nsDocumentOpenInfo::nsDocumentOpenInfo(uint32_t aFlags,
bool aAllowListenerConversions) bool aAllowListenerConversions)
@ -78,7 +80,7 @@ nsDocumentOpenInfo::nsDocumentOpenInfo(uint32_t aFlags,
mFlags(aFlags), mFlags(aFlags),
mURILoader(nullptr), mURILoader(nullptr),
mDataConversionDepthLimit( mDataConversionDepthLimit(
StaticPrefs::general_document_open_conversion_depth_limit()), mozilla::StaticPrefs::general_document_open_conversion_depth_limit()),
mAllowListenerConversions(aAllowListenerConversions) {} mAllowListenerConversions(aAllowListenerConversions) {}
nsDocumentOpenInfo::~nsDocumentOpenInfo() {} nsDocumentOpenInfo::~nsDocumentOpenInfo() {}
@ -269,7 +271,7 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest* request) {
LOG((" forceExternalHandling: %s", forceExternalHandling ? "yes" : "no")); LOG((" forceExternalHandling: %s", forceExternalHandling ? "yes" : "no"));
if (forceExternalHandling && if (forceExternalHandling &&
StaticPrefs::browser_download_open_pdf_attachments_inline()) { mozilla::StaticPrefs::browser_download_open_pdf_attachments_inline()) {
// Check if this is a PDF which should be opened internally. We also handle // Check if this is a PDF which should be opened internally. We also handle
// octet-streams that look like they might be PDFs based on their extension. // octet-streams that look like they might be PDFs based on their extension.
bool isPDF = mContentType.LowerCaseEqualsASCII(APPLICATION_PDF); bool isPDF = mContentType.LowerCaseEqualsASCII(APPLICATION_PDF);