Bug 1225053 - use null principal in gfxSVGGlyphs.cpp r=edwin
authorYoshi Huang <allstars.chh@mozilla.com>
Fri, 19 Feb 2016 15:35:24 +0800
changeset 285680 e46b452357990be9b9838e13086e277bedda077b
parent 285679 4a66b0ddeddfb9c83f9bb628b4dd7257fe519ac2
child 285681 9bf8c3d6ec19585b441345ae42f3e3c83f517a9e
push id72467
push useryhuang@mozilla.com
push dateFri, 26 Feb 2016 02:52:32 +0000
treeherdermozilla-inbound@e46b45235799 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1225053
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1225053 - use null principal in gfxSVGGlyphs.cpp r=edwin From 5dc33ddf1254acb5356490a4d1a50b97ae61c7e2 Mon Sep 17 00:00:00 2001 --- gfx/thebes/gfxSVGGlyphs.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
gfx/thebes/gfxSVGGlyphs.cpp
--- a/gfx/thebes/gfxSVGGlyphs.cpp
+++ b/gfx/thebes/gfxSVGGlyphs.cpp
@@ -342,20 +342,18 @@ gfxSVGGlyphsDocument::ParseDocument(cons
     nsCOMPtr<nsIURI> uri;
     nsHostObjectProtocolHandler::GenerateURIString(NS_LITERAL_CSTRING(FONTTABLEURI_SCHEME),
                                                    nullptr,
                                                    mSVGGlyphsDocumentURI);
  
     rv = NS_NewURI(getter_AddRefs(uri), mSVGGlyphsDocumentURI);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    // TODO: Bug 1225053 - gfxSVGGlyphs.cpp should use correct principal
-    PrincipalOriginAttributes attrs;
     nsCOMPtr<nsIPrincipal> principal =
-        BasePrincipal::CreateCodebasePrincipal(uri, attrs);
+      do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
     NS_ENSURE_TRUE(principal, NS_ERROR_FAILURE);
 
     nsCOMPtr<nsIDOMDocument> domDoc;
     rv = NS_NewDOMDocument(getter_AddRefs(domDoc),
                            EmptyString(),   // aNamespaceURI
                            EmptyString(),   // aQualifiedName
                            nullptr,          // aDoctype
                            uri, uri, principal,