Backed out changeset 5cdc1511d8ca (bug 1686200) for causing multiple perma failures. CLOSED TREE

This commit is contained in:
smolnar 2021-01-13 15:23:32 +02:00
parent f5cc97cd7c
commit f4821a90be

View File

@ -9,7 +9,6 @@
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/Blob.h"
#include "mozilla/dom/BlobURLProtocolHandler.h"
#include "mozilla/NullPrincipal.h"
#include "mozilla/Unused.h"
#include "nsContentUtils.h"
#include "nsNetUtil.h"
@ -31,12 +30,6 @@ void URLMainThread::CreateObjectURL(const GlobalObject& aGlobal, Blob& aBlob,
nsCOMPtr<nsIPrincipal> principal =
nsContentUtils::ObjectPrincipal(aGlobal.Get());
if (!principal->SchemeIs("http") && !principal->SchemeIs("https")) {
// In case the global is not the security context of http or https,
// then we want to use a NullPrincipal for generating the blob.
// This is the case e.g. for pdf.js
principal = NullPrincipal::CreateWithInheritedAttributes(principal);
}
nsAutoCString url;
aRv = BlobURLProtocolHandler::AddDataEntry(aBlob.Impl(), principal,
@ -63,12 +56,6 @@ void URLMainThread::CreateObjectURL(const GlobalObject& aGlobal,
nsCOMPtr<nsIPrincipal> principal =
nsContentUtils::ObjectPrincipal(aGlobal.Get());
if (!principal->SchemeIs("http") && !principal->SchemeIs("https")) {
// In case the global is not the security context of http or https,
// then we want to use a NullPrincipal for generating the blob.
// This is the case e.g. for pdf.js
principal = NullPrincipal::CreateWithInheritedAttributes(principal);
}
nsAutoCString url;
aRv = BlobURLProtocolHandler::AddDataEntry(&aSource, principal,