Backed out 12 changesets (bug 1685801) for causing bc failures in browser_ctrlTab.js

CLOSED TREE

Backed out changeset 021924b62f13 (bug 1685801)
Backed out changeset 38cc10101c1f (bug 1685801)
Backed out changeset 9ab9574ac72a (bug 1685801)
Backed out changeset 1a7f259cc2ec (bug 1685801)
Backed out changeset b267b19a7f6e (bug 1685801)
Backed out changeset 7dfcf0257487 (bug 1685801)
Backed out changeset ee0d0169b079 (bug 1685801)
Backed out changeset 0c358ee51951 (bug 1685801)
Backed out changeset 338ab91af557 (bug 1685801)
Backed out changeset a49415007aaf (bug 1685801)
Backed out changeset b91098299143 (bug 1685801)
Backed out changeset edf6209861a8 (bug 1685801)
This commit is contained in:
Mihai Alexandru Michis
2021-01-28 22:55:11 +02:00
parent c9854aedab
commit e10f79168a
54 changed files with 1094 additions and 1059 deletions

View File

@@ -57,11 +57,9 @@
#include <stdint.h>
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/Exceptions.h"
#include "mozilla/dom/nsCSPContext.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/WorkerCommon.h"
#include "mozilla/dom/WorkerPrivate.h"
@@ -1118,49 +1116,6 @@ nsScriptSecurityManager::CheckLoadURIStrWithPrincipal(
return rv;
}
NS_IMETHODIMP
nsScriptSecurityManager::CheckLoadURIWithPrincipalFromJS(nsIPrincipal* aPrincipal,
nsIURI* aTargetURI,
uint32_t aFlags,
uint64_t aInnerWindowID,
JSContext* aCx) {
NS_ENSURE_ARG_POINTER(aTargetURI);
nsresult rv = CheckLoadURIWithPrincipal(aPrincipal,
aTargetURI,
aFlags,
aInnerWindowID);
if (NS_FAILED(rv)) {
nsAutoCString uriStr;
Unused << aTargetURI->GetSpec(uriStr);
nsAutoCString message("Load of ");
message.Append(uriStr);
nsAutoCString principalStr;
Unused << aPrincipal->GetSpec(principalStr);
if (!principalStr.IsEmpty()) {
message.AppendPrintf(" from %s", principalStr.get());
}
message.Append(" denied");
dom::Throw(aCx, rv, message);
}
return rv;
}
NS_IMETHODIMP
nsScriptSecurityManager::CheckLoadURIStrWithPrincipalFromJS(
nsIPrincipal* aPrincipal, const nsACString& aTargetURIStr,
uint32_t aFlags, JSContext* aCx) {
nsCOMPtr<nsIURI> targetURI;
MOZ_TRY(NS_NewURI(getter_AddRefs(targetURI), aTargetURIStr));
return CheckLoadURIWithPrincipalFromJS(aPrincipal, targetURI, aFlags, 0, aCx);
}
NS_IMETHODIMP
nsScriptSecurityManager::InFileURIAllowlist(nsIURI* aUri, bool* aResult) {
MOZ_ASSERT(aUri);