diff --git a/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp b/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp index 1146b22e4ca..4d893662a4f 100644 --- a/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp +++ b/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp @@ -119,6 +119,9 @@ nsIPref* nsFT2FontCatalog::sPref = nsnull; NS_IMPL_ISUPPORTS1(nsFT2FontCatalog, nsIFontCatalogService) nsFT2FontCatalog::nsFT2FontCatalog() + : mFontCatalog(nsnull), + mRange1Language(nsnull), + mRange2Language(nsnull) { #if (defined(MOZ_ENABLE_FREETYPE2)) nsresult rv; diff --git a/mozilla/gfx/src/x11shared/nsFT2FontNode.cpp b/mozilla/gfx/src/x11shared/nsFT2FontNode.cpp index 93ad7751374..c3b68a5dd61 100644 --- a/mozilla/gfx/src/x11shared/nsFT2FontNode.cpp +++ b/mozilla/gfx/src/x11shared/nsFT2FontNode.cpp @@ -68,8 +68,7 @@ nsIFontCatalogService* nsFT2FontNode::sFcs = nsnull; void nsFT2FontNode::FreeGlobals() { - nsServiceManager::ReleaseService("@mozilla.org/gfx/xfontcatalogservice;1", - sFcs); + NS_IF_RELEASE(sFcs); if (mFreeTypeNodes) { mFreeTypeNodes->Reset(FreeNode, nsnull); @@ -87,10 +86,10 @@ nsFT2FontNode::InitGlobals() sInited = PR_TRUE; - nsServiceManager::GetService("@mozilla.org/gfx/xfontcatalogservice;1", - NS_GET_IID(nsIFontCatalogService), - (nsISupports**) &sFcs); - if (!sFcs) { + nsresult rv = ::CallGetService("@mozilla.org/gfx/xfontcatalogservice;1", + &sFcs); + + if (NS_FAILED(rv)) { NS_ERROR("Font Catalog Service init failed\n"); return NS_ERROR_FAILURE; }