diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-22 05:39:02 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 16:03:01 +0200 |
commit | a95439db61c4530afae3967e2912d6ca38f1bbda (patch) | |
tree | ed8926c1fe52c8072dbaff40278c1f0370980c2f /dom | |
parent | f5fcb8a32ccbe9af1a16a05c4959f7389eae37c1 (diff) | |
download | uxp-a95439db61c4530afae3967e2912d6ca38f1bbda.tar.gz |
Issue #1822 - Part 3: Remove LOAD_CLASSIFIER_URI and various
helper functions.
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/Navigator.cpp | 3 | ||||
-rw-r--r-- | dom/base/nsObjectLoadingContent.cpp | 1 | ||||
-rw-r--r-- | dom/fetch/FetchDriver.cpp | 3 | ||||
-rw-r--r-- | dom/html/HTMLMediaElement.cpp | 1 | ||||
-rw-r--r-- | dom/html/HTMLTrackElement.cpp | 2 | ||||
-rw-r--r-- | dom/jsurl/nsJSProtocolHandler.cpp | 5 | ||||
-rw-r--r-- | dom/media/MediaResource.cpp | 4 | ||||
-rw-r--r-- | dom/plugins/base/nsPluginHost.cpp | 2 | ||||
-rw-r--r-- | dom/script/ScriptLoader.cpp | 3 | ||||
-rw-r--r-- | dom/security/nsCSPContext.cpp | 2 | ||||
-rw-r--r-- | dom/workers/ScriptLoader.cpp | 1 | ||||
-rw-r--r-- | dom/xhr/XMLHttpRequestMainThread.cpp | 3 |
12 files changed, 8 insertions, 22 deletions
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 0e4a406fee..4fd7405644 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -885,8 +885,7 @@ Navigator::SendBeacon(const nsAString& aUrl, return false; } - nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | - nsIChannel::LOAD_CLASSIFY_URI; + nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL; // No need to use CORS for sendBeacon unless it's a BLOB nsSecurityFlags securityFlags = (!aData.IsNull() && aData.Value().IsBlob()) diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index 27e4e7b7e9..525ece9296 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -2660,7 +2660,6 @@ nsObjectLoadingContent::OpenChannel() group, // aLoadGroup shim, // aCallbacks nsIChannel::LOAD_CALL_CONTENT_SNIFFERS | - nsIChannel::LOAD_CLASSIFY_URI | nsIChannel::LOAD_BYPASS_SERVICE_WORKER); NS_ENSURE_SUCCESS(rv, rv); if (inherit) { diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index 79bd5a0e39..e755edeb3b 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -210,8 +210,7 @@ FetchDriver::HttpFetch() MOZ_ASSERT(mLoadGroup); nsCOMPtr<nsIChannel> chan; - nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | - bypassFlag | nsIChannel::LOAD_CLASSIFY_URI; + nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | bypassFlag; if (mDocument) { MOZ_ASSERT(mDocument->NodePrincipal() == mPrincipal); rv = NS_NewChannel(getter_AddRefs(chan), diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index a483198655..21f62b0e32 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -664,7 +664,6 @@ public: nullptr, // aCallbacks nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY | nsIChannel::LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE | - nsIChannel::LOAD_CLASSIFY_URI | nsIChannel::LOAD_CALL_CONTENT_SNIFFERS); if (NS_FAILED(rv)) { diff --git a/dom/html/HTMLTrackElement.cpp b/dom/html/HTMLTrackElement.cpp index 07fbe2073d..9799a2d156 100644 --- a/dom/html/HTMLTrackElement.cpp +++ b/dom/html/HTMLTrackElement.cpp @@ -326,7 +326,7 @@ HTMLTrackElement::LoadResource() nsIContentPolicy::TYPE_INTERNAL_TRACK, loadGroup, nullptr, // aCallbacks - nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI); + nsIRequest::LOAD_NORMAL); NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv)); diff --git a/dom/jsurl/nsJSProtocolHandler.cpp b/dom/jsurl/nsJSProtocolHandler.cpp index 7602e58b0b..82d24d1334 100644 --- a/dom/jsurl/nsJSProtocolHandler.cpp +++ b/dom/jsurl/nsJSProtocolHandler.cpp @@ -837,11 +837,6 @@ nsJSChannel::SetLoadFlags(nsLoadFlags aLoadFlags) bogusLoadBackground = !loadGroupIsBackground; } - // Classifying a javascript: URI doesn't help us, and requires - // NSS to boot, which we don't have in content processes. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=617838. - aLoadFlags &= ~LOAD_CLASSIFY_URI; - // Since the javascript channel is never the actual channel that // any data is loaded through, don't ever set the // LOAD_DOCUMENT_URI flag on it, since that could lead to two diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index 84a8d67fd9..5271cfe4be 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -799,7 +798,6 @@ ChannelMediaResource::RecreateChannel() { nsLoadFlags loadFlags = nsICachingChannel::LOAD_BYPASS_LOCAL_CACHE_IF_BUSY | - nsIChannel::LOAD_CLASSIFY_URI | (mLoadInBackground ? nsIRequest::LOAD_BACKGROUND : 0); MediaDecoderOwner* owner = mCallback->GetMediaOwner(); @@ -1350,7 +1348,7 @@ already_AddRefed<MediaResource> FileMediaResource::CloneData(MediaResourceCallba nsContentPolicyType contentPolicyType = element->IsHTMLElement(nsGkAtoms::audio) ? nsIContentPolicy::TYPE_INTERNAL_AUDIO : nsIContentPolicy::TYPE_INTERNAL_VIDEO; - nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI; + nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL; nsCOMPtr<nsIChannel> channel; nsresult rv = diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 482a201f8f..8a87f672e8 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -3204,7 +3204,7 @@ nsresult nsPluginHost::NewPluginURLStream(const nsString& aURL, nsIContentPolicy::TYPE_OBJECT_SUBREQUEST, nullptr, // aLoadGroup listenerPeer, - nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI | + nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_BYPASS_SERVICE_WORKER); NS_ENSURE_SUCCESS(rv, rv); diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 5b7bea8d22..3e1c13af5c 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -1046,8 +1046,7 @@ ScriptLoader::StartLoad(ScriptLoadRequest *aRequest, const nsAString &aType, contentPolicyType, loadGroup, prompter, - nsIRequest::LOAD_NORMAL | - nsIChannel::LOAD_CLASSIFY_URI); + nsIRequest::LOAD_NORMAL); NS_ENSURE_SUCCESS(rv, rv); diff --git a/dom/security/nsCSPContext.cpp b/dom/security/nsCSPContext.cpp index a553680feb..ec698b91d0 100644 --- a/dom/security/nsCSPContext.cpp +++ b/dom/security/nsCSPContext.cpp @@ -925,7 +925,7 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource, } // try to create a new channel for every report-uri - nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI; + nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL; if (doc) { rv = NS_NewChannel(getter_AddRefs(reportChannel), reportURI, diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp index 35d5ba6271..56381a0c8d 100644 --- a/dom/workers/ScriptLoader.cpp +++ b/dom/workers/ScriptLoader.cpp @@ -142,7 +142,6 @@ ChannelFromScriptURL(nsIPrincipal* principal, parentDoc = nullptr; } - aLoadFlags |= nsIChannel::LOAD_CLASSIFY_URI; uint32_t secFlags = aIsMainScript ? nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED : nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS; diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp index 8a1c1f0ada..c96f59ab6d 100644 --- a/dom/xhr/XMLHttpRequestMainThread.cpp +++ b/dom/xhr/XMLHttpRequestMainThread.cpp @@ -2479,8 +2479,7 @@ XMLHttpRequestMainThread::CreateChannel() nsCOMPtr<nsILoadGroup> loadGroup = GetLoadGroup(); nsSecurityFlags secFlags; - nsLoadFlags loadFlags = nsIRequest::LOAD_BACKGROUND | - nsIChannel::LOAD_CLASSIFY_URI; + nsLoadFlags loadFlags = nsIRequest::LOAD_BACKGROUND; if (nsContentUtils::IsSystemPrincipal(mPrincipal)) { // When chrome is loading we want to make sure to sandbox any potential // result document. We also want to allow cross-origin loads. |