layout-suck
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 75 aa1b133fd1616ee46ee56e3d4cbeea19da6c6650
permissions -rw-r--r--
State as of now

* * *
* * *

diff --git a/layout/mathml/base/src/nsMathMLChar.cpp b/layout/mathml/base/src/nsMathMLChar.cpp
--- a/layout/mathml/base/src/nsMathMLChar.cpp
+++ b/layout/mathml/base/src/nsMathMLChar.cpp
@@ -199,14 +199,14 @@ Clean(nsString& aValue)
 // helper to load a MathFont Property File
 static nsresult
 LoadProperties(const nsString& aName,
-               nsCOMPtr<nsIPersistentProperties>& aProperties)
+               nsIPersistentProperties** aProperties)
 {
   nsAutoString uriStr;
   uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
   uriStr.Append(aName);
   uriStr.StripWhitespace(); // that may come from aName
   uriStr.AppendLiteral(".properties");
-  return NS_LoadPersistentPropertiesFromURISpec(getter_AddRefs(aProperties), 
+  return NS_LoadPersistentPropertiesFromURISpec(aProperties, 
                                                 NS_ConvertUTF16toUTF8(uriStr));
 }
 
@@ -334,7 +334,8 @@ nsGlyphTable::ElementAt(nsPresContext* a
   if (mState == NS_TABLE_STATE_ERROR) return kNullGlyph;
   // Load glyph properties if this is the first time we have been here
   if (mState == NS_TABLE_STATE_EMPTY) {
-    nsresult rv = LoadProperties(*mFontName[0], mGlyphProperties);
+    nsresult rv = LoadProperties(*mFontName[0],
+                                 getter_AddRefs(mGlyphProperties));
 #ifdef NS_DEBUG
     nsCAutoString uriStr;
     uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
@@ -839,7 +840,7 @@ InitGlobals(nsPresContext* aPresContext)
 
   nsCAutoString key;
   nsAutoString value;
-  nsCOMPtr<nsIPersistentProperties> mathfontProp;
+  nsIPersistentProperties* mathfontProp = nsnull;
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
 
   // Add the math fonts in the gGlyphTableList in order of preference ...
@@ -848,7 +849,7 @@ InitGlobals(nsPresContext* aPresContext)
 
   // Load the "mathfont.properties" file
   value.Truncate();
-  rv = LoadProperties(value, mathfontProp);
+  rv = LoadProperties(value, &mathfontProp);
   if (NS_FAILED(rv)) return rv;
 
   // Get the list of mathfonts having special glyph tables to be used for