From ed39c773e8d9d9a8ed2742bcf78d05c6241b5fe4 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Sun, 21 Sep 2014 09:46:30 -0700 Subject: [PATCH] Bug 1038756: Callsites creating a channel in /editor/ (r=ehsan) --- editor/libeditor/nsHTMLDataTransfer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/libeditor/nsHTMLDataTransfer.cpp b/editor/libeditor/nsHTMLDataTransfer.cpp index e16f64912ed1..240a4f463ee4 100644 --- a/editor/libeditor/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/nsHTMLDataTransfer.cpp @@ -86,6 +86,7 @@ #include "nsWSRunObject.h" #include "nsXPCOM.h" #include "nscore.h" +#include "nsContentUtils.h" class nsIAtom; class nsILoadContext; @@ -1080,7 +1081,12 @@ nsresult nsHTMLEditor::InsertObject(const char* aType, nsISupports* aObject, boo nsCOMPtr imageStream; if (insertAsImage) { NS_ASSERTION(fileURI, "The file URI should be retrieved earlier"); - rv = NS_OpenURI(getter_AddRefs(imageStream), fileURI); + rv = NS_OpenURI(getter_AddRefs(imageStream), + fileURI, + nsContentUtils::GetSystemPrincipal(), + nsILoadInfo::SEC_NORMAL, + nsIContentPolicy::TYPE_OTHER); + NS_ENSURE_SUCCESS(rv, rv); } else { imageStream = do_QueryInterface(aObject);